Ultimate Script Protection



Option 1

   Place the following script in your script page so that it must be referrer to from the calling page.
   The drawback with this option is you will always be referrered to the calling page if you step back
   from another page in your site. This may work well with a site with few pages.
e.g.
   if (document.referrer != 'your calling page')
      document.location.replace('your calling page');


Option 2

   Call your script page from within a script off another page disabling the menubar and toolbar.
   This will eliminate the user select "view source" from the menu, and "edit source" from the toolbar.
   In turn call the go function from a button or link on the calling page.
e.g.
   function go(){
      Script page=window.open("script page.html","script page","toolbar=no, menubar=no");
      Script Page.location.replace('script page.html');
      }


Option 3

   Netscape allows for script commands that set the browser toolbar and menubar's visiblity.
   I tried these but could not seem to get them to work.

   self.menubar.visible=false;
   self.toolbar.visible=false;
   self.locationbar.visible=false;
   self.personalbar.visible=false;
   self.scrollbars.visible=false;
   self.statusbar.visible=false;


Option 4 (a must for IE users)

   Utilize the many "no right click" javascripts, for IE, floating around; to disable the right click menu option.

   function noRClick()
      {
      if (event.button == 2 | event.button == 3)
         {
         alert("Protected by: Secure Script");
         }
      }


Visit my Homepage to see a working example.