Setting a default option for a comb box

D

Doogie

I posted this question a few days ago but I think that post is drying
up and I still do not have an answer. I need to set a default option
for a combo box that is not the first item in that combo box. Below
is an example. I can put the code below into a simple HTML file and
it works fine. It does NOT work in a ASP 3.0 app. I have tried two
seperate ASP apps as an example and NEITHER work.

I have tried variations of the "selected ="true"" part. But nothing
is working. I am surprised it is so difficult to set a default for a
combo box in ASP! Is there some other way to do this? If anyone has
any ideas, I would really appreciate them, this was supposed to be a
simple change and it is taking a very long time to accomplish! :)

<select name="cboCompany" style="text-align:right; font-size:8pt">
<option value="08">08</option>
<option value="09" selected="true">09</option>
<option value="33">33</option>
<option value="18">18</option>
<option value="17">17</option>
</select>
 
E

Evertjan.

Doogie wrote on 25 feb 2007 in microsoft.public.inetserver.asp.general:
I posted this question a few days ago but I think that post is drying
up and I still do not have an answer. I need to set a default option
for a combo box that is not the first item in that combo box. Below
is an example. I can put the code below into a simple HTML file and
it works fine. It does NOT work in a ASP 3.0 app. I have tried two
seperate ASP apps as an example and NEITHER work.

I have tried variations of the "selected ="true"" part. But nothing
is working. I am surprised it is so difficult to set a default for a
combo box in ASP! Is there some other way to do this? If anyone has
any ideas, I would really appreciate them, this was supposed to be a
simple change and it is taking a very long time to accomplish! :)

<select name="cboCompany" style="text-align:right; font-size:8pt">
<option value="08">08</option>
<option value="09" selected="true">09</option>
<option value="33">33</option>
<option value="18">18</option>
<option value="17">17</option>
</select>

This has nothing to do with ASP, as ASP is a serverside platform.
Furtheremore it seems not a scripting Q.
You where lucky someone in this NG answered you in the first place.
Please follow up on a clientside html NG.
 
B

Bob Lehmann

Since it apears to you to be an ASP problem, maybe you should post some
related ASP code, or at least some of the surrounding HTML

Even though selected="true" is invalid, it works for me in an ASP page.

I think you misunderstood Mark's recommendation to View Source. He meant, in
your browser, with the page loaded, Edit | View Source.

Bob Lehmann
 
M

Mike Brind

Doogie said:
I posted this question a few days ago but I think that post is drying
up

How can it be "drying up"? There are new posts on that thread today!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,763
Messages
2,569,563
Members
45,039
Latest member
CasimiraVa

Latest Threads

Top