[Javascript] Capturing a keystroke in Netscape 6

Witenitenarmr at aol.com Witenitenarmr at aol.com
Mon Mar 4 15:53:46 CST 2002


I can capture the keypressed event from my frame called MAIN, but I can't 
return the
character value.

   function keyPressed(KeyEvent) {
      var KeyChar = new Number(KeyEvent.which)
      var sentString = ""   
      sentString = sentString+unescape("%" + KeyChar.toString(16))
     alert(KeyEvent.which+"     "+sentString)
   }

The sentString becomes an N for any key pressed and KeyEvent is undefined.
-------------- next part --------------
An embedded message was scrubbed...
From: javascript-request at LaTech.edu
Subject: Welcome to the "Javascript" mailing list
Date: Fri, 15 Feb 2002 13:44:00 -0600 (CST)
Size: 3094
URL: <http://lists.evolt.org/pipermail/javascript/attachments/20020304/1757855e/attachment.eml>


More information about the Javascript mailing list