Closed
Bug 358752
Opened 19 years ago
Closed 19 years ago
event.keyCode
Categories
(Firefox :: Menus, defect)
Tracking
()
People
(Reporter: seemes, Unassigned)
Details
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.0.3705; .NET CLR 1.1.4322)
Build Identifier:
When i use this validation. Works fine in IE. Not working in firefox. Gives an error "event not defined". How to fix this issue in firefox?.
<input type="text" name="var_no" onKeyPress="check(this);">
function check(obj){
if(event.keyCode < 45 || event.keyCode > 57)
{
alert('Enter correct value');
obj.focus();
event.keyCode = 0;
}
}
Reproducible: Always
Comment 1•19 years ago
|
||
IE uses a non-standard events system including a global events object. Firefox on the other hand uses the DOM spec so this is invalid.
The various web development forums and newsgroups should be able to point you to code that can make things work in both browsers.
*** This bug has been marked as a duplicate of 54341 ***
Status: UNCONFIRMED → RESOLVED
Closed: 19 years ago
Resolution: --- → DUPLICATE
Please post cross browser solution for this.
Status: RESOLVED → UNCONFIRMED
Resolution: DUPLICATE → ---
Comment 3•19 years ago
|
||
This is not a web development forum, this is for bug reports in Firefox. This is a duplicate of bug 54341. Since this has already been evaluated and determined to be invalid you should seek support either from the various web development forums on the web or from support forums specific to Mozilla at http://www.mozilla.org/support.
*** This bug has been marked as a duplicate of 54341 ***
Status: UNCONFIRMED → RESOLVED
Closed: 19 years ago → 19 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•