Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Fill An Option with data

 
N Nanda
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello to all. I am using Struts for my project. I have a form with two drop-down-lists. I want to fill the second list according to selection in first one. Can anyone help me achive this please. Its an urgency.

Thanx in advance,

Niranjan Nanda
 
Ray Stojonic
Ranch Hand
Posts: 326
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
On select box 1, set onchange = to a javascript function that submits the form. The action reads the selection made and retrieves the results from the database and stores them in the request and returns the user to the jsp. Back on the jsp, the second select box detects the inclusion of the results and populates the options.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic