How to prevent Re-Post action caused by pressing browser's Refresh button





2.00/5 (2 votes)
Could you not achieve the same thing with javascript?if (document.all){ document.onkeydown = function () { var key_f5 = 116; if (key_f5==event.keyCode){ event.keyCode=0; alert ("Sorry! You can not refresh this page!"); ...
Could you not achieve the same thing with javascript?
if (document.all){
document.onkeydown = function ()
{
var key_f5 = 116;
if (key_f5==event.keyCode){
event.keyCode=0;
alert ("Sorry! You can not refresh this page!");
return false;
}
}
}