Home Articles FAQs XREF Games Software Instant Books About Feedback Search Site-Map
irt.org logo

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

irt.org | Knowledge Base | JavaScript | Form 2 | Q111 [ previous next ]

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

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>

Provide feedback ...
AddThis Social Bookmark Button

Provide feedback ... AddThis Social Bookmark Button


Last Updated: 30th March 2008. Maintained by: Martin Webb and Michel Plungjan
irt.org liability, trademark, document use, privacy statement and software licensing rules apply.
Copyright © 1996-2008 irt.org, All Rights Reserved.