Results 1 to 5 of 5

Thread: Display message and link if user is in IE

  1. #1
    Join Date
    Apr 2007
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Display message and link if user is in IE

    Hello All,
    I recently discovered a problem with the gallery on my website when users try to look at pictures using Internet Explorer. The good news is I fixed the problem, and made an alternate copy of the gallery which does work properly using Internet Explorer. Now instead of automatically redirecting them to the IE compatible one, I would like to place a link to the compatible gallery if they are using Internet Explorer. I tried modifying a couple other browser detection scripts to do this, but I could never seem to get it to work.
    If any one could give me and ideas, that would be great!
    Thanks.
    Sean

  2. #2
    Join Date
    Jul 2006
    Location
    Canada
    Posts
    2,581
    Thanks
    13
    Thanked 28 Times in 28 Posts

    Default

    Place in the body:
    Code:
    <script type="text/javascript">
    var msg = '<a href="">IE page</a>';
    if (document.all) document.write(msg);
    </script>
    - Mike

  3. #3
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Other browsers support document.all - this code will be seen only by IE:

    HTML Code:
    <!--[if IE]>
    <br>If you are dumb enough to be using IE:<br>
    <a href="ie_page.htm">IE Version</a><br>
    <![endif]-->
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  4. #4
    Join Date
    Jul 2006
    Location
    Canada
    Posts
    2,581
    Thanks
    13
    Thanked 28 Times in 28 Posts

    Default

    <br>If you are dumb enough to be using IE:<br>
    Lol...

    I knew there was a HTML way of doing it, I had just... uh. Forgot it .
    - Mike

  5. #5
    Join Date
    Apr 2007
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Perfect! Thanks a lot guys, works great.

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
  •