This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Chained Select Drop Down box  RSS feed

 
Luke Zechariah
Ranch Hand
Posts: 142
  • 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
Sheriff
Posts: 37234
519
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.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!