Solved

get browser type using ASP

Posted on 2009-06-27
3
396 Views
Last Modified: 2012-05-07
I have the following code in my page to find out the browser type. I am using Internet Explorer 7. But how comes the result returning the Browser is Netscape...?

the result which I got is

output:
Browser: Netscape
Version: 4.00
Majorver: 4
Minorver: 00
Platform: unknown
Supports frames: True
Supports tables: True
Supports cookies: True
Supports JavaScript: True

thanks
<%
' create an instance of the Browser Capabilities component
Set browserdetect = Server.CreateObject("MSWC.BrowserType")
 
browser=browserdetect.Browser
version=browserdetect.Version
majorver=browserdetect.Majorver
minorver=browserdetect.Minorver
platform=browserdetect.Platform
frames=browserdetect.Frames
tables=browserdetect.Tables
cookies=browserdetect.Cookies
javascript=browserdetect.JavaScript
 
 
' send some output to the web browser
response.write ("Browser: " & browser & "<BR>")
response.write ("Version: " & version & "<BR>")
response.write ("Majorver: " & majorver & "<BR>")
response.write ("Minorver: " & minorver & "<BR>")
response.write ("Platform: " & platform & "<BR>")
response.write ("Supports frames: " & frames & "<BR>")
response.write ("Supports tables: " & tables & "<BR>")
response.write ("Supports cookies: " & cookies & "<BR>")
response.write ("Supports JavaScript: " & javascript & "<BR>")
%>

Open in new window

0
Comment
Question by:siva_gk
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 29

Expert Comment

by:rdivilbiss
ID: 24730094
>how comes the result returning the Browser is Netscape...?

Probably because you are using no or an old Browsercap.ini file which does not have the correct information.

http://support.microsoft.com/kb/311227
0
 
LVL 29

Expert Comment

by:rdivilbiss
ID: 24730145
0
 

Accepted Solution

by:
siva_gk earned 0 total points
ID: 24761659
var agent= navigator.userAgent.toLowerCase();
var ie = agent.indexOf("msie")>=0;
if (ie){
} else {
alert('Other than IE Not Supported');
//redirect to warning page
}


this is what I want...
0

Featured Post

Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
ASP CDO - Limiting Connections 3 73
Select record with the most recent date 14 72
Time Conversions...both ways 2 32
Validating Date Part2 2 47
I recently decide that I needed a way to make my pages scream on the net.   While searching around how I can accomplish this I stumbled across a great article that stated "minimize the server requests." I got to thinking, hey, I use more than one…
I have helped a lot of people on EE with their coding sources and have enjoyed near about every minute of it. Sometimes it can get a little tedious but it is always a challenge and the one thing that I always say is:   The Exchange of informatio…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

710 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question