topical media & game development

talk show tell print

basic-javascript-appendix-5-NNOnly.htm / htm



  <HTML>
  <HEAD>
  <SCRIPT>
  
  function getBrowserName()
  {
     var lsBrowser = navigator.appName;
     if (lsBrowser.indexOf("Microsoft") >= 0)
     {
        lsBrowser = "MSIE";
     }
     else if (lsBrowser.indexOf("Netscape") >= 0)
     {
        lsBrowser = "NETSCAPE";
     }
     else
     {
        lsBrowser = "UNKNOWN";
     }
     return lsBrowser;
  }
  
  function checkBrowser()
  {
     if (getBrowserName() == "MSIE")
     {
        window.location.replace("IEOnly.htm");
     }
  }
  
  </SCRIPT>
  </HEAD>
  <BODY ONLOAD="checkBrowser()">
  
  <H2>Welcome to the Netscape Navigator only page</H2>
  
  </BODY>
  </HTML>
  


(C) Æliens 20/2/2008

You may not copy or print any of this material without explicit permission of the author or the publisher. In case of other copyright issues, contact the author.