chico1st Posted August 11, 2006 Share Posted August 11, 2006 I have 2 radio buttons in a form. I was wondering how to trigger a button if someone clicks on a different part of the form, like in a text box?I searched it but i didnt know what to search for except "radio button" which gave me a million resultsTHANKS! Quote Link to comment Share on other sites More sharing options...
corbin Posted August 11, 2006 Share Posted August 11, 2006 [code=php:0]<script type="text/javascript"><!--function check(name){document.getElementById(name).checked=true}function uncheck(name){document.getElementById(name).checked=false}//--></script><input type="radio" name="R1" value="V1" id="R1" /><BR><input type="text" name="text" onClick="check('R1');" />[/code]Thatll make it where if someone clicks in the text box it selects the radio button... Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.