Have a play with this code:
When you position a cursor in one of the text boxes, button 1 gets focus although the taborder remains intactCode:<HTML> <HEAD> </HEAD> <BODY> <form><INPUT name=text1><br> <INPUT name=text2><br> <INPUT name=text3><br> <INPUT type='submit' value="Button 1" name=button1> <INPUT type='submit' value="Button 2" name=button2> </form> </BODY> </HTML>
i.e. you can still tab from text1 to text2
How can I make button 2 get focus instead?
Doing this:
messes up the tab orderCode:<HTML> <HEAD> </HEAD> <BODY> <form name=f1><INPUT name=text1 onfocus="document.f1.button2.focus()"><br> <INPUT name=text2 onfocus="document.f1.button2.focus()"><br> <INPUT name=text3 onfocus="document.f1.button2.focus()"><br> <INPUT type='submit' value="Button 1" name=button1> <INPUT type='submit' value="Button 2" name=button2> </form> </BODY> </HTML>![]()


Reply With Quote
) attribute for the form elements? You might have some luck with it...

