S
Scott Navarre
Hi,
I have Red Hat 8.0 and have the default Mozilla browser that comes with
it. I am programming in javascript and have come across something
problematic. Given the following code:
<HTML>
<HEAD>
</HEAD>
<BODY>
<FORM>
<INPUT TYPE="TEXT" NAME="input1">
<INPUT TYPE="BUTTON" VALUE="Click" onFocus="input2.focus()"
onClick="alert('You clcked me!')">
<INPUT TYPE="TEXT" NAME="input2">
</FORM>
</BODY>
</HTML>
When using MSIE or Netscape for Windows: if you click inside the first
text input and then tab to the button, it will automatically forward focus
to the second text input where you can type text there. This is how I want
it to behave.
But when using Mozilla in RH8.0: when you tab to the button the cursor
appears in the second text input, and so looks like it is working correctly.
But when you try to type something, nothing happens -- the cursor just sits
there blinking. If you then hit the enter key, it will act the same as if
the button has focus (popping up the alert window, since hitting Enter while
a button has focus is the same as clicking the button with the mouse).
So it seems to me that when tabbing to the button, the button is
internally keeping focus even though the event handler is telling it to
forward focus to the second text input and even though the second text input
appears to have focus with the appearance of a cursor.
And the problem isn't only when the element I am trying to skip is a
button. Given the following code:
<HTML>
<HEAD>
</HEAD>
<BODY>
<FORM>
<INPUT TYPE="TEXT" NAME="input1">
<INPUT TYPE="TEXT" NAME="input2" onFocus="input3.focus()">
<INPUT TYPE="TEXT" NAME="input3">
</FORM>
</BODY>
</HTML>
Once again, MSIE and Netscape for Windows handles this properly. But in
Mozilla for RH8.0 when tabbing to the second text input, the cursor appears
there and you can type in the second text input -- it doesn't forward the
focus at all. And worse yet when tabbing from the second text input to the
third text input, the cursor skips the THIRD text input and appears in the
location input at the top of the browser!!!
Furthermore when 'clicking' on the second text input with the mouse, the
text cursor appears in the second text input and stays there but typed text
from the keyboard appears in the third text input.
Does anyone know if these are bugs with that Mozilla (or that version of
it), or does Mozilla have a different event handler or javascript command
that I can give to make it work properly??? The Netscape version on Windows
I am using is 4.0, and I thought Mozilla was created FROM Netscape...
Thanks in advance,
Scott Navarre
I have Red Hat 8.0 and have the default Mozilla browser that comes with
it. I am programming in javascript and have come across something
problematic. Given the following code:
<HTML>
<HEAD>
</HEAD>
<BODY>
<FORM>
<INPUT TYPE="TEXT" NAME="input1">
<INPUT TYPE="BUTTON" VALUE="Click" onFocus="input2.focus()"
onClick="alert('You clcked me!')">
<INPUT TYPE="TEXT" NAME="input2">
</FORM>
</BODY>
</HTML>
When using MSIE or Netscape for Windows: if you click inside the first
text input and then tab to the button, it will automatically forward focus
to the second text input where you can type text there. This is how I want
it to behave.
But when using Mozilla in RH8.0: when you tab to the button the cursor
appears in the second text input, and so looks like it is working correctly.
But when you try to type something, nothing happens -- the cursor just sits
there blinking. If you then hit the enter key, it will act the same as if
the button has focus (popping up the alert window, since hitting Enter while
a button has focus is the same as clicking the button with the mouse).
So it seems to me that when tabbing to the button, the button is
internally keeping focus even though the event handler is telling it to
forward focus to the second text input and even though the second text input
appears to have focus with the appearance of a cursor.
And the problem isn't only when the element I am trying to skip is a
button. Given the following code:
<HTML>
<HEAD>
</HEAD>
<BODY>
<FORM>
<INPUT TYPE="TEXT" NAME="input1">
<INPUT TYPE="TEXT" NAME="input2" onFocus="input3.focus()">
<INPUT TYPE="TEXT" NAME="input3">
</FORM>
</BODY>
</HTML>
Once again, MSIE and Netscape for Windows handles this properly. But in
Mozilla for RH8.0 when tabbing to the second text input, the cursor appears
there and you can type in the second text input -- it doesn't forward the
focus at all. And worse yet when tabbing from the second text input to the
third text input, the cursor skips the THIRD text input and appears in the
location input at the top of the browser!!!
Furthermore when 'clicking' on the second text input with the mouse, the
text cursor appears in the second text input and stays there but typed text
from the keyboard appears in the third text input.
Does anyone know if these are bugs with that Mozilla (or that version of
it), or does Mozilla have a different event handler or javascript command
that I can give to make it work properly??? The Netscape version on Windows
I am using is 4.0, and I thought Mozilla was created FROM Netscape...
Thanks in advance,
Scott Navarre