• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

html:select

 
Ranch Hand
Posts: 129
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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

ex.

The values of the first options of the html:select are:
color
shape
size
If i choose shape, the options for the second html:select must be
round,oval,square,etc.

And if i choose size the options of the second must be
small,medium,large

I think javascript cannot solve this bacause i am polpulating the html:select from database.
 
Bartender
Posts: 4121
IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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...)

  •  
    reply
      Bookmark Topic Watch Topic
    • New Topic