473,503 Members | 1,648 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

(java script) How can i disable a drop down list?

25 New Member
Hi,

I want to disable drop down list according to the selection on radio buttons.

my code
[HTML] <td > SEARCH </td>
<td><input type="radio" name="letterOption" ></td>
<td> <select name="letter"/> </td>
<td><input type="radio" name="fileOption" ></td>
<td> <select name="fileName"/> </td>
[/HTML]
If user selects letterOption then the second fileOption and select list should be disabled.
How can i acheive this.?
Aug 22 '07 #1
1 1820
acoder
16,027 Recognized Expert Moderator MVP
Please use code tags when posting code.

Use the onclick event handler on the radio button to control the disabling.

Use the 'disabled' property to disable an element:
Expand|Select|Wrap|Line Numbers
  1. selObj.disabled = true;
Aug 22 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
2882
by: Dan | last post by:
This is one that has me stumped and I need an expert's input. Any ideas why the values from the second script-generated drop down list isn't recognized by the script to add time values to the...
1
9584
by: David Van D | last post by:
Hi there, A few weeks until I begin my journey towards a degree in Computer Science at Canterbury University in New Zealand, Anyway the course tutors are going to be teaching us JAVA wth bluej...
7
1955
by: dbabin | last post by:
I have a java script function enableServerList() {document.getElementById("ddlServers").disabled=false } function disableServerList() {document.getElementById("ddlServers").disabled=true } ...
2
6925
by: Jobs | last post by:
Download the JAVA , .NET and SQL Server interview with answers Download the JAVA , .NET and SQL Server interview sheet and rate yourself. This will help you judge yourself are you really worth of...
2
3951
by: astolpho | last post by:
I am using a slightly outdated reference book on J2EE programming. It gives 2 methods of creating a database used in its casestudies. The first is an ANT script that gives the following output: ...
4
2603
by: =?Utf-8?B?S2VycnlD?= | last post by:
I am trying to disable a list item in a drop down list. The list looks something like "Item 1 Other items that may interest you Item 2 Item 3"
0
993
by: rohitbce | last post by:
I have written code to generate dropdown menu in java script. it overlap all the controls of the pages like label,radio,images except the drop down list control. for the drop down i have tryied...
1
6979
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...
0
7449
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5570
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,...
0
4666
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...
0
3160
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...
0
3149
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1498
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 ...
1
730
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
373
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...

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.