[Javascript] Focus problem with Firefox
Triche Osborne
wdlists at triche-osborne.com
Tue Jan 23 12:32:50 CST 2007
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?
>
I did some additional testing on this. Without going into the
observational details, the tests seem to indicate that upon exiting the
trigger field, both browsers automatically spawn a default focus on the
next field in tab order. However, whereas IE cancels that default focus
in favor of the new field, FF doesn't and gets confused as a result. (In
FF, a subsequent tab away from this "no-man's-land focus" always
returned to the location bar, regardless of what field it should have
moved to.)
Perhaps if you could tell us why and under what conditions you want to
skip the second field (or focus on the third), we could be of more help
with a workaround.
Triche
>
>
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
>
> <html>
>
> <head>
>
> <script LANGUAGE="JavaScript">
>
> function change_focus()
>
> {
>
> //document.getElementById('box3').focus();
>
> document.myform.box3.focus();
>
> }
>
> </script>
>
> </head>
>
> <body>
>
>
>
> <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>
>
> </html>
>
>
>
>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Javascript mailing list
> Javascript at LaTech.edu
> https://lists.LaTech.edu/mailman/listinfo/javascript
More information about the Javascript
mailing list