Win a copy of Java 9 Revealed this week in the Features new in Java 9 forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Chained Select Drop Down box  RSS feed

 
Luke Zechariah
Ranch Hand
Posts: 138
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I am new to groovy/grails

I am trying to develop a code in gsp for chained select drop down. There are two drop downs. One for state and another for county.

That is if I select a state, it should show the corresponding counties. If I select Iowa, the counties drop down shoul display Fremont, Harrison, Mills.

I have an enum with counties for each state. Please help me develop a gsp select with javascript or Jquery or ajax. Here is the code below

Here is the code snippet.



HTML Code


 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 36616
473
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Luke,
There's a jQuery plugin that does chained selects. I recommend you use that rather than trying to write from scratch.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!