Results 1 to 3 of 3

Thread: Netscape6 and the KeyCode

  1. #1

    Thread Starter
    Member
    Join Date
    Aug 2000
    Posts
    45

    Netscape6 and the KeyCode

    I've got the following code in a .js file. I use it to validate a keypress event on a form posted on the web. I've chopped most of the code out of it because I want one specific problem answered.

    function kp_character(e)
    {
    alert(e.keyCode);
    }

    Now then, when I hit the back key I get a value of '8', which is expected. If I hit delete I get a value of '46' (if I remember correctly), which is also expected. For some reason, ALL other number and alpha keys give me a value of '0'. The fact it comes up zero is a bad thing since I'm expecting a keycode value.

    Why, oh WHY am I not getting typical keycode values?

    Thanks
    -Gregg
    -NoOBie At LaRg3

  2. #2
    scoutt
    Guest
    are you changing them to lower case in your function. I seen a script that uses the keys to laod documents in an Iframe and it was changing them to lowercase. I might be mistaken also.

  3. #3

    Thread Starter
    Member
    Join Date
    Aug 2000
    Posts
    45

    Nope

    I don't change the case. For any letter I press I get a "0" value wether it is lower or upper case. The same is true for numbers.
    -Gregg
    -NoOBie At LaRg3

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width