473,387 Members | 1,757 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,387 software developers and data experts.

disable option in dropdown menu?


Hi,

How can I disable an option in a drop-down menu? Specifically, I want
to disable the option "Bouncy Castles". I want to display it, I just
want the user to be able to select it. As well, how can I remove the
indentation?

Here's the drop-down menu:

<select name="stuff">
<optgroup label="A">
<option>Apple</option>
<option>Apricosts</option>
</optgroup>
<optgroup label="B">
<option>Ballon</option>
<option>Bouncy Castles</option>
<option>Beanies</option>
</optgroup>
</select>

Oct 19 '07 #1
1 6482

"carrajo" <ca*******@gmail.comwrote in message
news:11**********************@e9g2000prf.googlegro ups.com...
>
Hi,

How can I disable an option in a drop-down menu? Specifically, I want
to disable the option "Bouncy Castles". I want to display it, I just
want the user to be able to select it. As well, how can I remove the
indentation?

Here's the drop-down menu:

<select name="stuff">
<optgroup label="A">
<option>Apple</option>
<option>Apricosts</option>
</optgroup>
<optgroup label="B">
<option>Ballon</option>
<option>Bouncy Castles</option>
<option>Beanies</option>
</optgroup>
</select>
<option value='bounce' selected='selected'>Bouncy Castles</option--
default selection if needed
<option value='bounce' disabled='disabled'etc - can see it but cannot
select it

Regards
John


Oct 20 '07 #2

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

Similar topics

4
by: Quatney | last post by:
Okay, I'm going nuts here. I know this is VERY easy and I shouldn't have problems with this, but I can't seem to figure out what I want to do. I have a form, with two drop down boxes. I want...
0
by: bala | last post by:
hi there is a custom built menu in an ms access 2000 applications (also xp application). all the command buttons or bars are going to be visible but i need to disable and able according the...
1
by: Christopher D. Wiederspan | last post by:
I'm wondering if there's a way to use javascript to disable a ASP.NET web page before it starts to postback. Specifically, here's what I'm running into. I've got a webform that has an autopostback...
10
by: Geoff | last post by:
Is there any way to change the enabled property of a dropdownlist without a postback, depending on the selection in another dropdownlist? Select Case ddlReport.SelectedValue Case "Profit" ...
2
by: Kevin | last post by:
I've been looking all over and I can't seem to find what ought to be simple. I need to disable a drop down when a checkbox is checked, and enable it when same checkbox is unchecked. I've...
5
by: balu435 | last post by:
Hi friends, I have an (VBA) application which programatically fills the options in a web page. I have an dropdown menu whose options are selected during run-time by using a function.Is there...
3
by: bhanubalaji | last post by:
hi, I am unable to disable the text(label) in javascript..it's working fine with IE,but i am using MOZILLA.. can any one help regarding this.. What's the wrong with my code? I am...
3
by: thirish | last post by:
Hi, I have jsp page, on jsp page, The data is displaying from xml island. the Requriement is i have optional button and dropdown in each row. if user check the option button in second row then...
1
by: ibeehbk | last post by:
HI. I have a dropdown menu named arrivalcity (options are Rome, Naples, Palermo, and CAtania). I also have 4 other dropdown menus which have departure dates for those cities. Basically I want...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.