Hi all, 

I have a textbox and a checkbox in a form on my web page. I would like to
automatically check the checkbox when the user starts to type something in
the textbox. I believe this can be done by using some javascript. I did some
research over the web and was able to find some code which is shown below.
However I was not able to get it to work.

HTML code:
<input name="containText" TYPE="text" size = "32"
onfocus="checker('contain')" />
<input type = "checkbox" name = "contain" />

Javascript code:
function checker(checkbox) {
var checkBox=document.form.contain; 
checkBox.checked = true;

}


Any help will be greatly appreciated.

Thanks a lot
Cheers,
vishy
-- 
View this message in context: 
http://www.nabble.com/Check-a-checkbox-when-focus-on-a-textbox-tp20603583p20603583.html
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to