This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes JSP and the fly likes changing list values at run-time Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » JSP
Reply Bookmark "changing list values at run-time" Watch "changing list values at run-time" New topic
Author

changing list values at run-time

Anirudh Chhabra
Greenhorn

Joined: Aug 27, 2004
Posts: 1
Hi guys
I want to populate a list item ie drop down menu on the basis of the selection user has made in the previous dropdown - very much similar to Select Location >> India and then on the basis on India another list will be populated that will contain the states.
How should i go about it? i'm using JSP and all the values have to be read from database
should i use request dispatcher or refresh te same page with additional parameters passed as query string?
pls help
Adeel Ansari
Ranch Hand

Joined: Aug 15, 2004
Posts: 2874
you can do it in both ways, either request server to query out the DB and send the results back to the same jsp page or you can have all the stuff with you on the client side and do this with javascript.

and wht you are saying sounds fine. you can use request dispatcher and refresh the page.
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: changing list values at run-time
 
Similar Threads
how to restrict user from selecting a particular value in JLISt
writing into xml as wells as into tables
Drop Down Box in Struts - Select Default Value Implementation
Java POI
Displaying record from combo box