Hi there
I wonder if someone could help with what seems to be a simple browser incompatibility problem. I'm using the online editor and trying to set up a simple routine under an object's onKeyPress function. It seems to work fine in Chrome and IE but not in Firefox.
The aim of the routine is to return the ascii code associated with a key press. so:
function getKey(event)
{
console.log(event); // some debugging code to see if event is captured
var key = event.which;
console.log(key); // some debugging code to see if correct ASCII code is returned
return key;
}
As I say, seems to work fine except in Firefox where a console error is generated (ReferenceError: event is not defined) pointing to wade.js line 173 > eval
and none of the debugging code in the routine above yields any output
Can anybody help?