Go Back   CodingForums.com > :: Client side development > JavaScript programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 01-25-2006, 03:21 PM   PM User | #1
lisa1980
New to the CF scene

 
Join Date: Dec 2005
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
lisa1980 is an unknown quantity at this point
Radio Buttons

I have 2 radio buttons, I want to be able to click radio1 and that will disable dropdown boxes below.

this is what i have:


If rdostaightshift = True Then
cboStart1.Enable = false
End If

Thanks in advance
lisa1980 is offline   Reply With Quote
Old 01-25-2006, 09:21 PM   PM User | #2
Mr J
Senior Coder

 
Join Date: Aug 2002
Location: UK
Posts: 2,789
Thanks: 2
Thanked 14 Times in 14 Posts
Mr J is on a distinguished road
In Javascript you would go something like


PHP Code:
function test(){

if(
document.forms["formname"]["rdostaightshift"][1].checked==true){
document.forms["formname"]["cboStart1"].disabled=true
}
else{
document.forms["formname"]["cboStart1"].disabled=false
}


<form name="formname">

<input type="radio" name="rdostaightshift" onclick="test()">
<input type="radio" name="rdostaightshift" onclick="test()">

</form>
__________________
The silent one.

The most dangerous thing in the world is an idea.
The most dangerous person in the world is the one with an idea.
Mr J is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 12:27 PM.


Advertisement
Log in to turn off these ads.