Wrox Home  
Search P2P Archive for: Go

  Return to Index  

javascript thread: Keypress events in Netscape 6


Message #1 by "Anders Hansen" <ahh@j...> on Tue, 13 Mar 2001 14:51:53
I have a problem with handling keypress events in Netscape 6.

What I know is that it is possible to add "onKeyPress=xxxxxx " to the html
body tag.

The first problem is that I don't know how to see which key I have pressed.
 In IE it is possible to do that with the following: "if
(window.event.keyCode==xxx ) { do something }" - but that is not possible
in Netscape.

The second problem is that  I don't know  what to do if I only have a pure
JavaScript file ( not included in some html ). Then I don't have a body
tag, so where shall i write the onKeyPress statement then?

Thank you in advance
Anders ( ahh@j... )

  Return to Index