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

Q111 How when I click on the textBox do I set the focus to the checkBox?

You are here: irt.org | FAQ | JavaScript | Form | 2 | Q111 [ previous next ]

Try this:

<FORM NAME="formName">
<INPUT TYPE="TEXT" onFocus="blur();document.formName.tick.checked=true">
<INPUT TYPE="CHECKBOX" NAME="tick">
</FORM>

Or this:

<FORM NAME="formName2">
<INPUT TYPE="TEXT" onFocus="blur();document.formName2.tick.focus()">
<INPUT TYPE="CHECKBOX" NAME="tick">
</FORM>

©2018 Martin Webb