473,795 Members | 3,005 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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>Apricos ts</option>
</optgroup>
<optgroup label="B">
<option>Ballo n</option>
<option>Bounc y Castles</option>
<option>Beanies </option>
</optgroup>
</select>

Oct 19 '07 #1
1 6524

"carrajo" <ca*******@gmai l.comwrote in message
news:11******** **************@ e9g2000prf.goog legroups.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>Apricos ts</option>
</optgroup>
<optgroup label="B">
<option>Ballo n</option>
<option>Bounc y Castles</option>
<option>Beanies </option>
</optgroup>
</select>
<option value='bounce' selected='selec ted'>Bouncy Castles</option--
default selection if needed
<option value='bounce' disabled='disab led'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
5077
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 to be able to disable the second drop down box when a specific value is chosen on the first. I can't seem to figure out how to do this. Go easy on me, I'm a newbie for the most part, but here is my code.
0
1248
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 roles (the roles are stored in another table) associated with the user. for example there is option for opening "Employee Form" and say that particular user doesn't have any roles associated with the "Employee Form" so i need to disable the "Employee...
1
2365
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 dropdown box, and a couple of textboxes just below it. When the user selects an option from the dropdown, it triggers a postback event, which in-turn slightly adjusts the remainder of the page. The problem is that if the user is on a slow...
10
7065
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" ddlFormat.Enabled = True Case "Trial Balance"
2
26376
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 found any number of scripts to disable / enable a drop down but they are all made to work with 2 different buttons, radio group selections, etc. I can't seem to come up with one that can toggle off a single checkbox.
5
3596
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 anyway by which I can select the option in the dropdown menu programatically? If the dropdown menu had its options explicitily mentioned (like <option value="1">1</option>...) I could have used document.form.objectname.selectedindex=n But here all I...
3
6307
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 sending my code here.. Thanks in Advance... Regards
3
4861
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 second row dropdown should be enable. if uncheck then dropdown should be disable. Any body help in this case. In jsp page i will get more than two row. let me know if any more requriments. Thanks, Tirish
1
5060
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 those 4 dropdown menus disabled by default. Then based on which arrivalcity option they choose only one of those 4 dropdown menus gets enabled so they can select the departure date from the appropriate menu. I know this can get accomplished in...
0
9522
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 synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10448
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. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10217
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
7544
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 instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6784
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5440
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 the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5566
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4114
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3730
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.