Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Onkeyxxx Fails in Netscape 4.75

Status
Not open for further replies.

lennyh

Programmer
Sep 22, 2001
33
0
0
US
In Netscape 4.75, onkeypress, onkeyup and onkeydown fail on text boxes within a table. If the text boxes are not in a table, the onkeyxxx works.

This one fails:
<html>
<head>
<title>Test Keypress</title>
</head>
<body>
<form>
<table width=&quot;70%&quot; border=&quot;1&quot;><tr><td>
<b>CkKeyUp:</b></td><td>
<input type=&quot;text&quot; name=&quot;temp&quot; size=&quot;10&quot; onkeyup=&quot;alert('keyup')&quot;></td></tr>
<tr><td>
<b>CkKeyDn:</b></td><td>
<input type=&quot;text&quot; name=&quot;temp&quot; size=&quot;10&quot; onkeydown=&quot;alert('keydown')&quot;></td></tr>
<tr><td>
<b>CkKeyPress:</b></td><td>
<input type=&quot;text&quot; name=&quot;temp&quot; size=&quot;10&quot; onkeypress=&quot;alert('keypress')&quot;></td></tr>
</table>
</form>
</body>
</html>

but this one works:
<html>
<head>
<title>Test Keypress</title>
</head>
<body>
<form>
<b>CkKeyUp:</b></td><td>
<input type=&quot;text&quot; name=&quot;temp&quot; size=&quot;10&quot; onkeyup=&quot;alert('keyup')&quot;><br>
<b>CkKeyDn:</b>
<input type=&quot;text&quot; name=&quot;temp&quot; size=&quot;10&quot; onkeydown=&quot;alert('keydown')&quot;><br>
<b>CkKeyPress:</b>
<input type=&quot;text&quot; name=&quot;temp&quot; size=&quot;10&quot; onkeypress=&quot;alert('keypress')&quot;>
</form>
</body>
</html>

And even weirder, on rare occasions, the failing example will work as well. That is, if you keep reloading the failing example, once in a while (about 1 out of 10 times), it will work.

Can anyone tell me if there is any way to get the onkeyxxx triggers within a table to work reliably in NS 4.75? (I'm using the table merely as a layout device).

Thanks for any help/advice.


 
must you support NS 4.75?? =========================================================
if (!succeed) try();
-jeff
 
Unfortunately NS 4.75 is a possiblility. It sure would be a lot simpler if I could avoid it.
 
I'd recommend to start from this:
change all name=&quot;temp&quot; so each text field has it's own unique name (as it should be).
I don't believe that this is the source of the problem, but it can be a part of it.
 
Thanks for your response.

Specifying the same name for all the text boxes was an error in my post. But, as it turns out, it doesn't affect the problem. The same failure occurs when the names are different or even if the name attributes are removed.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top