I’m trying to simulate some software in a browser window for training purposes. When the user presses f3 I need it to go back to the prior page instead of opening the search dialogue in IE7. I’ve tried the following code but I receive:
An error has occuredError: 78 Permission Denied
Any ideas?
$('#command').keydown(function(e) {
if(e.which === 114) {
e = 0;
history.go(-1);
}
});
Move the redirect to the
keyuphandler and simplyreturn false;from thekeydownhandler. Returning false from thekeydownevent will cause the built in handler to not fire, then thekeyupevent will redirect.http://jsfiddle.net/CUDaR/4/