Quote:
Originally Posted by raicha
its working in all browsers except firefox.
|
window.event is specific to Internet Explorer 8 and earlier. Every other browser (including Internet Explorer 9) supports DOM2 Events, which means that you need to pass the event when the function is called.
The following code does that while still supporting older versions of Internet Explorer:
Code:
onkeydown="if (typeof(event) === 'object') { checkKey(event); } else { checkKey(window.event); }"
Code:
function checkKey(event) {
if (event.keyCode === 13) {
loadUrl();
}
}
I removed instances of
return true; since that code isn't doing anything.