Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2

Thread: Radio Buttons

  1. #1
    New to the CF scene
    Join Date
    Dec 2005
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    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

  • #2
    Senior Coder
    Join Date
    Aug 2002
    Location
    UK
    Posts
    2,789
    Thanks
    2
    Thanked 14 Times in 14 Posts
    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.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •