I'm trying to set default value for combo box based on a variable passed to the page. From CF Help doc, it seems easy, just set selected value to one of the value in options values but it didn't work for me :
In my page, this is the combo box code, my combo should select "Pondan" as my selected value since i pass the value "3", BUT still the first option "Lelaki" is selected instead:
<tr>
<td width="19%" height="19"><font face="Tahoma" size="2"><b>Daerah</b></font></td>
<td width="81%" height="19"><cfselect name="cmbTest" selected="#a#"><option value="1">Lelaki
<option value="2">Perempuan
<option value="3">Pondan</cfselect></td>
</tr>
Can anybody help me?
In my page, this is the combo box code, my combo should select "Pondan" as my selected value since i pass the value "3", BUT still the first option "Lelaki" is selected instead:
<tr>
<td width="19%" height="19"><font face="Tahoma" size="2"><b>Daerah</b></font></td>
<td width="81%" height="19"><cfselect name="cmbTest" selected="#a#"><option value="1">Lelaki
<option value="2">Perempuan
<option value="3">Pondan</cfselect></td>
</tr>
Can anybody help me?