Feedback on: irt.org FAQ Knowledge Base Q1425
Worth:
Worth reading
Comments:
My problem was a related issue:
How to overcome key event unreliability for form fields inside tables with NN4?
http://www.faqts.com/knowledge-base/view.phtml/aid/5491/fid/145/lang/en
Technical:
Not technical enough
Comments:
This is not quite true;
Windows gives for both the "num-lock enter" and the "return" code 13, but macintosh browsers give for the "num-lock enter" code 3, and for the "return" code 13.
Thought you might find it usefull to know.
Worth:
Worth reading
Length:
Just right
Technical:
Just right
Comments:
Hi!
The answer to Q1425 (and Q985) seem wrong to me. When using Netscape 6 on Win98, I always get 0 from e.which when pressing Enter (both when using a text form field and when using a textarea)!
*I'd REALLY like an answer to Q985 that would work in both IE and Netscape...*
Thanks in advance!
/Carl
Worth:
Worth reading
Comments:
I had trouble with Mozilla since it seemed to have a little of IE and a little of NS in it.
I was able to get Mozilla to work by passing 'event' to the keyPress() function. In IE you can just reference window.event (as this example shows), Mozilla wouldn't work that way.
Here's what I used;
onkeypress="return keyPress(event)"
[here's the js function it calls]
function keyPress(e) {
if (typeof(e) == "undefined") return true;
else if (typeof(e.keyCode) != "undefined") {
if (e.keyCode == 13) {
return doSearch();
}
}
return true;
}
Sorry this isn't very detailed but I was hoping it could be of use to someone