Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic


Jherald Lacambra
Ranch Hand
Posts: 129
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi I am new to struts and i want to know how to populate the html:select from data. I have to html:select. The values of the second select must depends on the first html:select


The values of the first options of the html:select are:
If i choose shape, the options for the second html:select must be

And if i choose size the options of the second must be

I think javascript cannot solve this bacause i am polpulating the html:select from database.
Nathan Pruett
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you're looking for help specifically with Struts, you should go to the Struts forum...

But this question really deals more with design of application flow rather than Struts directly - there are several choices you could make, depending on your application -

  • Send all possible information for all choices to the client and do JavaScript manipulation of the forms as choices are made.
  • Restucture your application so that what is currently one form is spread across 3 real forms, save data in session on the server until all forms are filled in.
  • Use AJAX - make a background request to the server using JavaScript when the button is pressed to make a quick request to the server to get the new information. (Visit the HTML/JavaScript forum here on JavaRanch for more information about AJAX...)

    Your mind is under my control .... your will is now mine .... read this tiny ad
    the new thread boost feature: great for the advertiser and smooth for the coderanch user
    • Post Reply Bookmark Topic Watch Topic
    • New Topic
    Boost this thread!