aspose file tools*
The moose likes JSP and the fly likes Populating DropDown  in javascript Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Populating DropDown  in javascript" Watch "Populating DropDown  in javascript" New topic
Author

Populating DropDown in javascript

Kaustubh Hande
Greenhorn

Joined: Apr 10, 2007
Posts: 18
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

Joined: Dec 11, 2004
Posts: 13410

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 ]

Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Populating DropDown in javascript
 
Similar Threads
dropdown & javascript
dropdown & javascript
more once how can we submit JSP values to Action
dropdown selection in Struts2
getting values into the drop down list from database