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! Link to comment https://forums.phpfreaks.com/topic/17211-radio-button/ 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... Link to comment https://forums.phpfreaks.com/topic/17211-radio-button/#findComment-72877 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.