473,320 Members | 1,883 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Setting a default option for a comb box

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>

Feb 25 '07 #1
4 5163
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.

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Feb 25 '07 #2
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
"Doogie" <dn******@dtgnet.comwrote in message
news:11**********************@a75g2000cwd.googlegr oups.com...
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>

Feb 25 '07 #3
"Doogie" wrote:
I have tried variations of the "selected ="true"" part...
There are no variations. You either use

selected="selected"

or nothing at all.

--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms.

Feb 25 '07 #4

"Doogie" <dn******@dtgnet.comwrote in message
news:11**********************@a75g2000cwd.googlegr oups.com...
>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!

--
Mike Brind
Feb 25 '07 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
by: Harlin Seritt | last post by:
There are certain options for Tkinter widgets that have default values that I don't much care for (borderwidth, font come to mind) and continuously change when I'm building interfaces. With a bit...
5
by: Harry Haller | last post by:
<select name="cboPlaces" id="cboPlaces"> <option value="3">Countryside</option> <option value="4">Forest</option> <option value="5">Mountain</option> <option value="6">Desert</option> <option...
0
by: Cat | last post by:
Hi. First of all, to be exact, it's Visual Web Developer 2005 Express Edition Beta (which can be downloaded from Microsoft freely). When I create a new HTML or ASPX file, the VWD always creates...
12
by: David Thielen | last post by:
Hi; I have my <form> in the master page because the master page includes the menu for all pages. But I would like to set the default button and control to place the caret in for each page. Is...
1
by: IMB | last post by:
I'm using VS2005 and am working with a ASP.NET 2.0 web site and I'm coding in VB.NET. I understand that I can add an item to a databound dropdownlist and make it the default selection using the...
7
by: Zytan | last post by:
I want to set a control in a form to have the default focus. This is not the accept button -- that's set to a button when is 'clicked' when you press ENTER. I want a textbox to have the focus...
1
by: Doug White | last post by:
How do I make a value the default value for a combo box in ASP 3.0? What I have below does NOT work, yet I've seen it in HTML file examples before (and works if I put it in a HTML file by itself, but...
3
by: vimal | last post by:
hi all, i am still a learner in javascript i have a select tag with options as follows: <select> <option py:for="mb in range(32,100)">${mb}</option> </select>
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.