469,622 Members | 1,922 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,622 developers. It's quick & easy.

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

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 1730
acoder
16,027 Expert Mod 8TB
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

Post your reply

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

Similar topics

1 post views Thread by Dan | last post: by
7 posts views Thread by dbabin | last post: by
4 posts views Thread by =?Utf-8?B?S2VycnlD?= | last post: by
reply views Thread by devrayhaan | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.