Forum Moderators: open
Thanks
Vicky...
function keyHandler(e)
{
var pressedKey;
if (document.all) { e = window.event; }
if (document.layers) { pressedKey = e.which; }
if (document.all) { pressedKey = e.keyCode; }
if(pressedKey == 27) { //27 is the escape key
cancelalert();
}
}
document.onkeypress = keyHandler;
Not sure if this will work on mozilla, however. You can try if you'd like, but I believe this is an IE solution only. Try a nice google search to see what you can come up with in terms of cross browser scripting.