• Post Reply Bookmark Topic Watch Topic
  • New Topic

jsp and jqeury onchange event for select box

 
santosh chaurasia
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i am fetching data from data base for filling select box option . i wanna fill select box option auto matically after selecting any of option of previous select box. first select boox containing the state name , and select select box containing city name . this city name fill on behalf of witch state is selected .
this is small coding od my registraion page..



please help thank how to do it in jsp jquery
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65519
105
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
First of all, I need to point out that your code is showing some very bad practices. Putting Java code in a JSP, especially database code, is a practice that has been discredited for 10 years now, since 2002! It's far past time to update your JSP knowledge with the JSTL and JSP.

What you are asking is a common requirement and you can search for previous questions on this subject.

As you are using jQuery, you can even get some free sample code by downloading the example code for my book for free here. Look for the "bootcloset" folder in the code for chapter 8.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!