• 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
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

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
 
A wop bop a lu bob a womp bam boom. Tutti frutti ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic