SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Hybrid View

  1. #1
    SitePoint Zealot
    Join Date
    Sep 2004
    Location
    london
    Posts
    160
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    stop loading page and exit if IE detected

    Hi there

    IE has a real problem working with my site at the moment and I want to force people to only NON Microsoft browsers for the moment until I get around to fixing the issue (I am only in beta, so its not a major issue)


    I have seen guides on how to do the detection, and im sure this is a real simple question, but how do i get it to stop loading the page (i.e just provide a blank white page) straight after the popup warning message?

    this is what i have

    Code:
    <SCRIPT language="JavaScript">
    <!--
    var browserName=navigator.appName; 
    if (browserName=="Microsoft Internet Explorer")
    { 
     alert("Unfortunately IE is not supported at the moment, please use Firefox or Chrome etc");
    SOMETHING HERE TO EXIT/STOP LOADING THE PAGE
    }
    //-->
    </SCRIPT>

    any guidance on this would be greatly appreciated

  2. #2
    SitePoint Wizard bronze trophy chris.upjohn's Avatar
    Join Date
    Apr 2010
    Location
    Melbourne, AU
    Posts
    2,189
    Mentioned
    17 Post(s)
    Tagged
    1 Thread(s)
    The easiest way to do this would be to create a quick HTML page and redirect the user to that page. For example...

    Code JavaScript:
    var browserName = navigator.appName; 
     
    if (browserName == 'Microsoft Internet Explorer') {
        window.location = 'noie.html';
    }

  3. #3
    SitePoint Zealot
    Join Date
    Sep 2004
    Location
    london
    Posts
    160
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thank you , that will do perfectly :-)


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •