• Post Reply Bookmark Topic Watch Topic
  • New Topic

drop down list pair population

 
tony al
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I would like to know if it is possible to have two drop down lists in a JSP such that choosing an option on one populates the other. Both the lists are to be populated from arrays.
Is it possible to do this without using java script? If so please let me know how with an example.
thanks a lot
 
Dave Vick
Ranch Hand
Posts: 3244
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
tony_al
Welcome to the Java Ranch, we hope you�ll enjoy visiting as a regular however,
your name is not in keeping with our naming policy here at the ranch. Please change your display name to an appropriate name as shown in the policy.
Thanks again and we hope to see you around the ranch!!
As far as your question, keep in mind that the only way to let the server know that something has been selected is to make a round trip and send it some sort of a request. Basically the oly thing a JSP (or a servlet for that matter) do is send a response to the browser after they ae done processing the request. To get new inofrmation/outpu from a JSP or servlet you need to send a new request and get a new response. To do something like this and not make another round trip to the server you would almost have to use javascript. The only other solution I can think of would be an applet but I'm not familiar enough with them to tell you, but there you'd still be making a round trip to the server to get the data to populate the list.
hope that helps
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!