• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Knute Snortum
  • Bear Bibeault
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Frits Walraven
  • Carey Brown
  • Tim Holloway

Fill An Option with data

 
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
 
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
Boost this thread!