Discussion Locked
0 helpful
5 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
In a webpage form I want to put focus on a particular text box when a particular checkbox or radio button is selected.
5 replies
You need to add onclick to the list of attributes for either the checkbox or the radio button, and use that event to call a Subroutine which sets the focus to your text box. i.e.:
Basic checkbox:
And the function:
This sets the focus to txtTextBox when chkBox is clicked on.
by vhansen86
The java script idea actually worked better for me. But thanks for your suggestion
by jay eckles
You did include "VB Script" in your question title, but if you really want to do this on a public webpage, I recommend you use Javascript. It will work just as well in IE and you won't automatically exclude every non-IE browser out there. Try thisscript:
by vhansen86
Thanks! Valerie
by vhansen86
This question was closed by the author
This discussion is closed to new replies.
Trending Web Development posts
Sort by Trending
1 helpful
9 replies
0 helpful
3 replies
Question
Windows and macOS computers becoming slow or unstable after updates - what should I check first
0 helpful
1 reply
Discussion
Optimizing WordPress widgets and DOM size
0 helpful
3 replies
Discussion Locked
Best Ways to Improve Website Visibility
0 helpful
5 replies