|
-
Oct 19th, 2001, 03:57 PM
#1
Thread Starter
Member
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
-
Oct 19th, 2001, 07:18 PM
#2
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.
-
Oct 22nd, 2001, 08:05 AM
#3
Thread Starter
Member
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.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|