OK,
I'm trying to capture a return key being pressed in a text box.
I capture the event successfully
onKeyPress="javascript:TrapKey();
and it calls this function...
function TrapKey(e)
{
alert('Key Trap Entered');
if(e.keyCode == 13)
{
e.keyCode == 0;
//do some stuff...
}
}
this works perfectly in IE
but in Mozilla the function gets called, but e is always undefined
and hence I cannot read the key code.
I've done some googling and come up with some variations
that try and set e, if it is not defined, but none of these work either, such as
if (!e) var e = window.event;
Any thoughts or hints would be appreciated.
Thanks
--
Dean Fiala
Very Practical Software, Inc
http://www.vpsw.com
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/AspNetAnyQuestionIsOk/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/