Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Show By default value in dropdown

 
naval kumar
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
on my jsp i have drop-down box in which i m showing counties list with key-value pairs in setting hashmap like

<bean:define id="countries" name="userForm" property="countries" />
<html:select property="country" styleClass="comboStyle" style="width:190px;">
<html:options collection="countries" property="value" labelProperty="key" />
</html:select>

and i want to show by default "India" in this drop-box. how can i do it please reply.
 
sankar manoharan
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Check out This


http://www.tizag.com/phpT/examples/formex.php
 
naval kumar
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
sankar manoharan wrote:Check out This


http://www.tizag.com/phpT/examples/formex.php


as provide link is very general .i am displaying the countries dynamically at the time of jsp loaded and i want to show the Country India By default in drop-down.
how can i do it??
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic