stop web pages from refreshing or disable menu bar
stop web pages from refreshing or disable menu bar and status bar and tool bar in browser and disable right click
basically refreshing is depend on browser
so one cant say that, that code stop browsers from refreshinghere is the code
/////////////////////first file
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
<script type="text/javascript">
function getWin(url,winName,w,h,top,left){
//you can change the status of these variables by punting yes
var newWin = window.open(url,winName,'menubar=no,statusbar=no,location=no,directories=no,width='+w+',height='+h+ ',top='+((screen.height-h)/5)+',left='+((screen.width-w)/2.1));
newWin.focus();
}
</script>
</head>
<body>
<a href="javascript:getWin('stoprefresh.php','win1','500','350','top','left');void(0);">Open</a>
</body>
</html>
////////////////////////////////////stoprefresh.php
<script type="text/javascript">
function showKeyCode(e)
{
/*alert("Inside function showKeyCode(e)");
*/var keycode =(window.event) ? event.keyCode : e.keyCode;
if(keycode == 116)
{
event.keyCode = 0;
event.returnValue = false;
return false;
window.document.statusbar.enable = false;
}
}
</script>
With Body section
<body onKeyDown ="showKeyCode();" oncontextmenu="return false" ondragstart="return false" onselectstart="return false">
</body>
this is the whole code
which run exactly on CROME
and IE
Recent Comments