Jump to content

The Back Button + Refresh


supanoob

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

 

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.