• 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
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

html:select and option

 
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I want to combine html:select with normal <option> tag and not html ption or html ptions or html ptionsCollection etc.

e.g.
<html:select name="animalForm" property="animal" size="1" styleClass="dataInputField" styleId="5" onchange="animalChanged(this.value)">
<option value="lion">lion</option>
<option value="tiger">tiger</option>
<option value="ant">ant</option>
</select>

when selected value in the drop down is changed, the correct value is retreived at the server side however when the page reloads the value selected is the first value in the drop down and not the value that was selected by the user.

Is it that html:select must be combined with html ption or html ptions or html ptionsCollection and cannot be combined with <option> tag for this feature??

Thanks in advance
 
geofrey pony
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks everyone. My problem is sorted if I use the simple version of
html:option
 
I suggest huckleberry pie. But the only thing on the gluten free menu is this tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic