SitePoint Sponsor

User Tag List

Results 1 to 2 of 2

Hybrid View

  1. #1
    SitePoint Zealot
    Join Date
    Dec 2000
    Location
    Ohio
    Posts
    150
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm looking for a script that will redirect the user based on whether their using NS 6, NS 4.x, IE 4+, Other. Anyone know where I can find this? Also, since I've never used a redirect script for any purpose, whats the approx. lag time I'll see from this?

  2. #2
    JavaScript Guru (Big Ego) Arielladog's Avatar
    Join Date
    Jul 1999
    Location
    SC, USA
    Posts
    390
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hey syanet,

    There shouldn't be much lag time involved inthis..maybe about 2 seconds or so ??

    Anyway, here's some code:

    Code:
    <script language="javascript"> 
    <!-- 
    if (document.getElementById&&document.all){ 
    location.href='IE5.html';
    } 
    else 
    if(document.all&&!window.print){ 
    location.href='IE4.html';
    } 
    else if(document.getElementById&&!document.all){ 
    location.href='NS6.html';
    } 
    else if(document.layers){ 
    location.href='NS4.html';
    } 
    else if (navigator.appName=="Opera") { 
    location.href='Opera.html';
    } else { 
    location.href='dumbBrowser.html';
    } 
    //-->
    </script>
    Just for information purposes, that detect a browser script came from http://javascriptcity.com/forums/ind...action=faq#qj5

    aDog


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
  •