Jump to content

Recommended Posts

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.

Link to comment
https://forums.phpfreaks.com/topic/51173-the-back-button-refresh/
Share on other sites

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

 

 

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.