SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Enthusiast
    Join Date
    Oct 2009
    Posts
    43
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    need js code to disable checkboxes...

    I need javascript code to disable (2) check box when radiobutton is selected..

    ...It would be great if someone Help me with that...

  2. #2
    From Italy with love silver trophybronze trophy
    guido2004's Avatar
    Join Date
    Sep 2004
    Posts
    9,508
    Mentioned
    163 Post(s)
    Tagged
    4 Thread(s)
    You should post JS questions in the JS forum. More chance of finding someone that can help you

  3. #3
    SitePoint Wizard PHPycho's Avatar
    Join Date
    Dec 2005
    Posts
    1,201
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hope this helps (untested version)
    Code JavaScript:
    var radio_flag = document.getElementById('radio_id').checked;
    if(radio_flag){
    document.getElementById('checkbox1_id').setAttribute('disabled', 'disabled');
    document.getElementById('checkbox2_id').setAttribute('disabled', 'disabled');
    }
    But beaware while chosing the right section for threads.

    Thanks

  4. #4
    SitePoint Enthusiast
    Join Date
    Oct 2009
    Posts
    43
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thanks for reply guys,

    Hereafter i ll post correctly....


Bookmarks

Posting Permissions

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