• 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 ...
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
  • Piet Souris
  • Himai Minh

Help me about html:select

Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i have a table. when you select a record on the table it will bind data to textbox and combobox but it is only bind data to textbox and not bind to combobox.
please help me.
this is my code in jsp file
<form action="Action/processCityAction.do" method="post" enctype="multipart/form-data" name="form1" id="form1">
<table width="500" border="1">
<td width="974" height="38"><div align="center" class="style1"> City Informations </div></td>
<td><table width="660" border="1">
<td width="114" bgcolor="#999999"><div align="center">City ID </div></td>
<td width="197" bgcolor="#999999"><div align="center">City Name </div></td>
<td width="149" bgcolor="#999999"><div align="center">Country ID </div></td>
<td width="187" bgcolor="#999999"><div align="center">Decriptions</div></td>
<td width="187" bgcolor="#999999"><div align="center">Delete</div></td>
<logic:iterate id="list" name="cityActionForm" property="cityList">
<td align="center">
<a href="Action/processCityAction.do?cityId=<bean:write name="list" property="cityId"/>&action=select"><bean:write name="list" property="cityId"/></a>
<td align="center"><bean:write name="list" property="cityName"/></td>
<td align="center"><bean:write name="list" property="countryID"/></td>
<td align="center"><bean:write name="list" property="descriptions"/></td>
<td align="center">
<a href="Action/processCityAction.do?cityId=<bean:write name="list" property="cityId"/>&action=delete">delete</a>

<table width="669" border="1">
<td><div align="right">City ID : </div></td>
<td colspan="2"><input type="text" name="cityId" value="<bean:write name="cityActionForm" property="cityId"/>" /></td>
<td width="119"><div align="right">Country : </div></td>
<td width="252">Here
it is not bind data when i select row from above table. it alway show the first record from list
<select name="countryID">
<logic:iterate id="list" name="cityActionForm" property="countryList">
<option value="<bean:write name="list" property="countryID"/>">
<bean:write name="list" property="countryName"/>
<td><div align="right">City Name : </div></td>
<td colspan="2"><input type="text" name="cityName" value="<bean:write name="cityActionForm" property="cityName"/>" /></td>
<td width="119" rowspan="2"><div align="right">Descriptions : </div></td>
<td width="252" rowspan="2"><input type="text" name="descriptions" value="<bean:write name="cityActionForm" property="descriptions"/>" /></td>
<td colspan="3"> </td>

<td colspan="3">
<div align="right">
<input name="btNew" type="reset" id="btNew" value="Reset" />
<td colspan="2">
<div align="left">
<input type="submit" id="btInsert" value=" OK " name="btInsert"/>
<p> </p>

please tell me when have you have answer.
You have to be odd to be #1 - Seuss. An odd little ad:
free, earth-friendly heat - a kickstarter for putting coin in your pocket while saving the earth
    Bookmark Topic Watch Topic
  • New Topic