SitePoint Sponsor

User Tag List

Results 1 to 2 of 2

Hybrid View

  1. #1
    SitePoint Addict
    Join Date
    Sep 2000
    Posts
    230
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Here's what im trying to do:
    Redirect a user if their using MAC IE 4 or below.

    Here's my code:
    <!--IE/Mac redirect-->
    <script language="JavaScript">
    {
    if(navigator.userAgent.indexOf('Mac') != -1 && navigator.appName.indexOf('Microsoft') !=-1 && navigator.appVersion.indexOf('4.')>=0)
    { window.location.href="index.html"; }
    }
    </script>
    <!--end script-->

    --It works but it also redirects IE 5 users.
    Any advice or things I should fix with this code.
    Thanks

  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)
    Try using this:

    if(navigator.userAgent.indexOf('Mac') != -1 && navigator.appName.indexOf('Microsoft') !=-1 && navigator.appVersion.indexOf('4.')>=0 && !document.getElementById){

    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
  •