473,583 Members | 3,413 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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="cboCompan y" 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 5171
Doogie wrote on 25 feb 2007 in microsoft.publi c.inetserver.as p.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="cboCompan y" 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******@dtgne t.comwrote in message
news:11******** **************@ a75g2000cwd.goo glegroups.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="cboCompan y" 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="selec ted"

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******@dtgne t.comwrote in message
news:11******** **************@ a75g2000cwd.goo glegroups.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
2075
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 of tweaking I have been able to give the widgets a look that rivals the best of them. However, I get tired of doing this when I'm writing code and...
5
17202
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 value="7">Jungle</option> <option value="7">Swamp</option> <option value="8">River</option> <option value="12">Town</option> <option...
0
1265
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 DEFAULT codepage file and saves it with default codepage. Though I can save it with Unicode by selecting "Save as" and clicking "Save with...
12
4562
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 there a way to do this? (My understanding is this has to be done in the form tag.) -- thanks - dave david_at_windward_dot_net
1
2863
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 following code: MyDropDownList.Items.Insert(0, "My default item") MyDropDownList.SelectedIndex = 0 The problem that I am experiencing is...
7
8046
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 when the form is loaded. The textbox cannot be the first in the Tab order, since it's not at the top of the window, and it seems silly to start the...
1
1658
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 not if I use it in a ASP 3.0 app) I have also seen messages in this forum that says it should work, but I've tried it two different asp 3.0 apps and...
3
7149
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
7894
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7824
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8176
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7931
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
6578
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5699
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3816
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
1426
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1154
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.