Please visit our sponsor
UNKNOWN //************************************** // Name: No Refresh, No NAV Back*, No Right Click, No Backspace, etc. // Description:To disable the right click, the backspace (for navigation purposes), and the refresh. // By: Matthew Khoury // // // Inputs:None // // Returns:None // //Assumes:*Obviously for this script to run effectively you MUST open up a NEW browser window in IE using JScript. Please note that for this script to run effectively it is recommended that you open a new browser using script to disable the navigation, link bars, etc., etc. Also, the cool thing about this code is that the JavaScript disables itself once the cursor is in a text are box, or input box - VERY COOL! PLEASE NOTE, THIS CODE WAS ONLY TESTED IN IE 5.0+. If you feel you can add to this code to make it better, be my guest. Send me the updated code and I will paste it right here. // //Side Effects:None //This code is copyrighted and has limited warranties. //Please see http://www.Planet-Source-Code.com/xq/ASP/txtCodeId.2250/lngWId.2/qx/vb/scripts/ShowCode.htm //for details. //************************************** <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> <title>NO REFRESH, NO REFRESH, NO BACKSPACE, NO ALT-BACKSPACE, ETC., ETC..</title> <script language="JAVASCRIPT"> var oLastBtn=0; bIsMenu = false; //No RIGHT CLICK************************ // **************************** if (window.Event) document.captureEvents(Event.MOUSEUP); function nocontextmenu() { event.cancelBubble = true event.returnValue = false; return false; } function norightclick(e) { if (window.Event) { if (e.which !=1) return false; } else if (event.button !=1) { event.cancelBubble = true event.returnValue = false; return false; } } document.oncontextmenu = nocontextmenu; document.onmousedown = norightclick; //************************************** // **************************** // Block backspace onKeyDown************ // *************************** function onKeyDown() { if ( (event.altKey) || ((event.keyCode == 8) && (event.srcElement.type != "text" && event.srcElement.type != "textarea" && event.srcElement.type != "password")) || ((event.ctrlKey) && ((event.keyCode == 78) || (event.keyCode == 82)) ) || (event.keyCode == 116) ) { event.keyCode = 0; event.returnValue = false; } } </script> </head> <body onkeydown="onKeyDown();" bgcolor="#639ace" marginheight="0" marginwidth="0" topmargin="0" leftmargin="0"> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td><h3>NO REFRESH, NO REFRESH, NO BACKSPACE, NO ALT-BACKSPACE, ETC., ETC..</h3></td> </tr> <tr> <td>Please note that for this script to run effectively it is recommended that you open a new browser using script to disable the navigation, link bars, etc., etc..</td> </tr> </table> </body> </html>