[Javascript] Focus problem with Firefox

Paul Novitski paul at juniperwebcraft.com
Fri Jan 26 19:15:40 CST 2007


At 1/22/2007 06:01 PM, robert wrote:
>I have problem with this piece of code in Mozzila Firefox (Ver. 
>1.5.0.9). IE works as expected. The problem is, that after leaving 
>first input field, the focus does change to box3, but the cursor is 
>not visible. Any suggestions?
...
>function change_focus()
>{
>document.myform.box3.focus();
>}
...
><form name='myform'>
>Box 1: <input id='box1' type='text' name='box1' onBlur='change_focus();'><br>
>Box 2: <input id='box2' type='text' name='box2'><br>
>Box 3: <input id='box3' type='text' name='box3'><br>
></form>


Why not simply use the HTML tabindex attribute?  That way your user 
interface won't break when scripting is disabled.

HTML 4.01 Specification
17 Forms
17.11.1 Tabbing navigation
http://www.w3.org/TR/html4/interact/forms.html#h-17.11.1

Regards,

Paul
__________________________

Juniper Webcraft Ltd.
http://juniperwebcraft.com 




More information about the Javascript mailing list