Home Articles FAQs XREF Games Software Instant Books BBS About FOLDOC RFCs Feedback Sitemap
irt.Org
#

Q661 Can I click some text next to a radio button to set the radio button to clicked?

You are here: irt.org | FAQ | JavaScript | Form | 3.5 | Q661 [ previous next ]

Try:

<HTML>

<SCRIPT LANGUAGE="JavaScript"><!--
function click(which) {
    document.theForm.theRadio[which].checked = true;
}

//--></SCRIPT>

<FORM NAME="theForm">
<INPUT TYPE="RADIO" NAME="theRadio" CHECKED> <A HREF="javascript:click(0)">Click this</A>
<BR>
<INPUT TYPE="RADIO" NAME="theRadio"> <A HREF="javascript:click(1)">Click this</A>
</FORM>

</HTML>

Feedback on 'Q661 Can I click some text next to a radio button to set the radio button to clicked?'

©2018 Martin Webb