Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    Jun 2006
    Posts
    30
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Exclamation if IE direct script to page 1 etc

    Hi there, need a bit of help. I have done a search but the results are giving me too much code for my needs. All I want is something very basic- (which seems harder to find than something not so).

    OK,

    I want some script that will go onto an ASP page. Basically I want that if the browser is IE it will present them with a bit of text and a link (to say page 1). But if it is not IE it will present them with a different piece of text and a link to page 2.

    It doesnt matter what version of IE it is (regardless wether its version 3 or vesion 7), I just need to determind if its IE or not.

    Does anyone have a very simple piece of code?

  • #2
    Supreme Master coder! glenngv's Avatar
    Join Date
    Jun 2002
    Location
    Philippines
    Posts
    11,032
    Thanks
    0
    Thanked 248 Times in 245 Posts
    This is the basic test for sniffing IE.
    Code:
    If InStr(1, Request.ServerVariables("HTTP_USER_AGENT"), "MSIE") then
      Response.Write "You are using Internet Explorer"
    Else
      Response.Write "You are not using Internet Explorer"
    End If


  •  

    Posting Permissions

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