supanoob Posted May 13, 2007 Share Posted May 13, 2007 Is there anyway to disable the use of the back button and the refresh button, or stop abit of code working if the back button or the refresh button is pressed. You see i am making a mini map and via the use of the back button people will be able to go off the path and i dont want them to do that. Quote Link to comment https://forums.phpfreaks.com/topic/51173-the-back-button-refresh/ Share on other sites More sharing options...
textbox Posted May 13, 2007 Share Posted May 13, 2007 Not that i am aware using php, but the ever helping mods will probably be able to tell you more. You could open up the map in a new 'fit to size' window, therefore disabling the 'back' button through default. As for the refresh part, try this; <Script language="javascript"> function checkKeyCode(evt) { var evt = (evt) ? evt : ((event) ? event : null); var node = (evt.target) ? evt.target : ((evt.srcElement) ? evt.srcElement : null); if(event.keyCode==116) { evt.keyCode=0; return false } } document.onkeydown=checkKeyCode; </script> Hope this helps! Nick Quote Link to comment https://forums.phpfreaks.com/topic/51173-the-back-button-refresh/#findComment-252002 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.