Is there any way to detect a key being pressed in the window? I have tried the following but it doesnt work:
document.onkeyup = KeyCheck;
var keyID = event.keyCode;
I know this is silly but could you need a semi colon after alert(...);
If you look in the bottom right of the browser you might see an error.
// You may need a doctype (or use document.body) for ie.
// For non-ie you need the argument that is passed in non ie event handlers
e= window.event || e;
Thanks mrhoo that does exactly what i need