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 3 of 3
  1. #1
    New Coder
    Join Date
    Aug 2003
    Posts
    26
    Thanks
    0
    Thanked 0 Times in 0 Posts

    disable/enable button

    Greetings all.
    And of course, many thanks in advance.

    How can I enable a button after I disable it with:

    document.forms(0).Submit.disabled='true';

    in a function from the onload() event?

    I want the button to be enabled when the user selects a particular radio button. I have tried:

    document.forms(0).Submit.disabled='false';

    in a function from the onClick() event of the radio button, but to no avail.

    Any input or direction would be greatly appreciated.


    Again, many thanks


    eck35

  • #2
    Kor
    Kor is offline
    Red Devil Mod Kor's Avatar
    Join Date
    Apr 2003
    Location
    Bucharest, ROMANIA
    Posts
    8,478
    Thanks
    58
    Thanked 379 Times in 375 Posts
    Try the method "checked" instead of "disabled"
    KOR
    Offshore programming
    -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

  • #3
    Senior Coder
    Join Date
    Jun 2002
    Posts
    1,404
    Thanks
    2
    Thanked 32 Times in 32 Posts
    <input type="radio"....onclick="Submit.disabled=false">

    ...assuming it's all in the same form.

    Using parentheses as array notation - like document.forms(0) - is IE-only.

    true / false are Boolean values - a data type and are not strings so, no quotes.

    Make sure to capitalize 'Submit' as a button name, if you use it at all...


  •  

    Posting Permissions

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