Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Populating DropDown in javascript

 
Kaustubh Hande
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
I have two dropdown in a jsp page in which values have already been populated using the controler servlet of application. Now when the user selects some value in 1st dropdown, based on this selection I need to populate the values of 2nd dropdown at runtime. What should I do for this as I need to query to the DB with the value selected in 1st dropdown to fetch values of 2nd dropdown. Can I do it in jsp if yes please tell how can it be dome.

Thanks
Kaustubh
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is one of our most asked questions.

If you have to get the values for the second list from the database then you'll need to do at least part of this on the server. Search this and the HTML/Javascript forum (this is commonly done with AJAX these days) and you will find many threads that discuss this.
[ September 06, 2007: Message edited by: Ben Souther ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic