View Full Version : option selected is not showing as selected

04-12-2007, 01:05 PM
i have form that has in it

<tr><td>Billing Country<font class=red> *</font>fieldvalue:2db value:2</td><td><select name=bcountry><option value="">--select--</option><option value='1'>Canada</option><option value='2' selected>Israel</option><option value='3'>United States</option><option value='5'>South Africa</option></select></td></tr>

now for some reason when I look at the page on the site (generated by asp) the options that is selected with selected after it is not showing as selected

if i copy and paste the complete html and save as a html file and look at it then it does work

any ideas?

04-12-2007, 01:57 PM
Do you have a link to the site?

04-12-2007, 04:07 PM
Try changing <option value='2' selected> to <option value="2" SELECTED="SELECTED">

04-18-2007, 02:14 PM
You need to tell your ASP script to select it
The code depends on how you are outputting your dropdown


If rs("field") = myVar then Response.Write " selected=""selected"""