gilgalbiblewhee
07-31-2007, 06:33 PM
Is there any If statement to check browsers?
I want to check IE6, IE7 and Firefox.
I want to check IE6, IE7 and Firefox.
|
||||
any If statements to check browsers?gilgalbiblewhee 07-31-2007, 06:33 PM Is there any If statement to check browsers? I want to check IE6, IE7 and Firefox. miranda 07-31-2007, 11:25 PM Using Request.ServerVariables("HTTP_User_Agent") will return the user agent (browser) string which you can parse to get the browser and version like so <% Dim browser browser = Request.ServerVariables("HTTP_User_Agent") If InStr(browser, "MSIE 6") > 0 Then 'It is IE 6 ElseIf InStr(browser, "MSIE 7") > 0 Then 'It is IE 7 ElseIf InStr(browser, "Firefox") > 0 Then 'It is firefox Else 'it is some other browser End If %> |
| |||
EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum