Plz Help

Discussion in 'PHP' started by getbiplab, Feb 23, 2008.

  1. #1
    I have two radio groups having two buttons each in a php page.as...

    <input type="radio" name="group1" value="Yes">Yes<br>
    <input type="radio" name="group1" value="No" checked>No<br>
    <hr>
    <input type="radio" name="group2" value="Yes">Yes<br>
    <input type="radio" name="group2" value="No" checked>No<br>
    where the "NO" is initially set true...
    Now I want when the user set the "YES" in any one of the groups as true(i.e. checked),the "YES" option in the other group to be checked automatically....

    How can I do that???
     
    getbiplab, Feb 23, 2008 IP
  2. projectshifter

    projectshifter Peon

    Messages:
    394
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Wrong forum, you want javascript ;) You want to do an onClick to the Yes values, although I'm not entirely sure how to get the value though for a radio button. It might be something like onClick="document.getElementsById('group2').value='Yes'" or something to that extent. If it were a select or a checkbox I could totally help you with that, but radio buttons are just awkward.
     
    projectshifter, Feb 23, 2008 IP
  3. zerxer

    zerxer Peon

    Messages:
    368
    Likes Received:
    18
    Best Answers:
    0
    Trophy Points:
    0
    #3
    zerxer, Feb 24, 2008 IP