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

Q601 How do I set focus to a text box when a checkbox is checked?

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

Q601 How do I set focus to a text box when a checkbox is checked?

Try:

<form>

<input type="checkbox" onClick="if (this.checked) this.form.myText.focus()">

<input type="text" name="myText">

</form>

Feedback on 'Q601 How do I set focus to a text box when a checkbox is checked?'


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.