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 6 of 6

Thread: reset button

  1. #1
    New Coder
    Join Date
    May 2009
    Posts
    32
    Thanks
    4
    Thanked 0 Times in 0 Posts

    reset button

    hello all,

    Once a reset button is pressed, everything goes to normal except a previously disabled radio button. The disabled radio button remain disabled until I refresh the page or enable and disable radio button again.

    How to make my previouly disabled button to go back to normal?


    Thanks

  • #2
    Regular Coder ninnypants's Avatar
    Join Date
    Apr 2008
    Location
    Utah
    Posts
    504
    Thanks
    10
    Thanked 47 Times in 47 Posts
    Just reverse your disabling when the reset button is clicked

  • #3
    New Coder
    Join Date
    May 2009
    Posts
    32
    Thanks
    4
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by ninnypants View Post
    Just reverse your disabling when the reset button is clicked
    How do I do that? Thanks

  • #4
    Regular Coder ninnypants's Avatar
    Join Date
    Apr 2008
    Location
    Utah
    Posts
    504
    Thanks
    10
    Thanked 47 Times in 47 Posts
    You would target you radio button with javascript just like you did to disable it, so something like this:
    Code:
    document.getElementById('radioId').disabled=false;

  • #5
    New Coder
    Join Date
    May 2009
    Posts
    32
    Thanks
    4
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by ninnypants View Post
    You would target you radio button with javascript just like you did to disable it, so something like this:
    Code:
    document.getElementById('radioId').disabled=false;
    That I know but should I make another function which gets activated when reset button is pressed?

    Thanks

  • #6
    Regular Coder ninnypants's Avatar
    Join Date
    Apr 2008
    Location
    Utah
    Posts
    504
    Thanks
    10
    Thanked 47 Times in 47 Posts
    yeah. Unless there is a way that you can make your other function do both and just toggle the disabled setting.

  • Users who have thanked ninnypants for this post:

    phpfan (06-18-2009)


  •  

    Posting Permissions

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