473,399 Members | 4,192 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

Browser Capability

Hi All,

I have IE6.0 SP1 and I executed one asp file with the below script to check
the browser capability but see the result below the script...Copied from
MSDN :)

<% Set bc = Server.CreateObject("MSWC.BrowserType") %>
Browser: <%= bc.browser %><BR>
Version: <%= bc.version %><BR>
Supports frames?
<% If (bc.frames = "true") then %>
Yes<BR>
<% Else %>
No<BR>
<% End If %>
Supports tables?
<% If (bc.tables = "true") then %>
Yes<BR>
<% Else %>
No<BR>
<% End If %>
Supports background sounds?
<% If (bc.BackgroundSounds = "true") then %>
Yes<BR>
<% Else %>
No<BR>
<% End If %>
Supports VBScript?
<% If (bc.vbscript = "true") then %>
Yes<BR>
<% Else %>
No<BR>
<% End If %>
Supports JavaScript?
<% If (bc.javascript = "true") then %>
Yes<BR>
<% Else %>
No<BR>
<% End If %>
OUTPUT:

Browser: Netscape
Version: 4.00
Supports frames? No
Supports tables? No
Supports background sounds? No
Supports VBScript? No
Supports JavaScript? No

why does the answeres shows wrong value while the IE6 supports all.

Thanks
Prabhat
Sep 29 '05 #1
3 1681
"Prabhat" <no********@hotmail.com> wrote in message
news:e6**************@TK2MSFTNGP12.phx.gbl...
Hi All,

I have IE6.0 SP1 and I executed one asp file with the below script to
check
the browser capability but see the result below the script...Copied from
MSDN :)

<% Set bc = Server.CreateObject("MSWC.BrowserType") %>
Browser: <%= bc.browser %><BR>
Version: <%= bc.version %><BR>
Supports frames?
<% If (bc.frames = "true") then %>
Yes<BR>
<% Else %>
No<BR>
<% End If %>
<snip>
why does the answeres shows wrong value while the IE6 supports all.


Because you're testing for a string value of "true" rather than the boolean
value of TRUE.
Change "true" to true or remove the ="true" part completely.

ie:
<%if (bc.frames) then%>
Yes<br>
<%else%>
No<br>
<%end if%>
Sep 29 '05 #2

"Danny@Kendal" <da***@STOPSPAMghpkendal.co.uk> wrote
Because you're testing for a string value of "true" rather than the boolean value of TRUE.
Change "true" to true or remove the ="true" part completely.

ie:
<%if (bc.frames) then%>
Yes<br>
<%else%>
No<br>
<%end if%>


Ok. you are right...

But now i have rectified that and got the below result.

Browser: Netscape
Version: 4.00
Supports frames? Yes
Supports tables? Yes
Supports background sounds? No
Supports VBScript? No
Supports JavaScript? Yes

It says NO to VBS and Sound ? also the browser is Netscape ? are these
correct?

Thanks
Prabhat
Sep 29 '05 #3
"Prabhat" <no********@hotmail.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...

"Danny@Kendal" <da***@STOPSPAMghpkendal.co.uk> wrote
Because you're testing for a string value of "true" rather than the

boolean
value of TRUE.
Change "true" to true or remove the ="true" part completely.

ie:
<%if (bc.frames) then%>
Yes<br>
<%else%>
No<br>
<%end if%>


Ok. you are right...

But now i have rectified that and got the below result.

Browser: Netscape
Version: 4.00
Supports frames? Yes
Supports tables? Yes
Supports background sounds? No
Supports VBScript? No
Supports JavaScript? Yes

It says NO to VBS and Sound ? also the browser is Netscape ? are these
correct?


Right, I'll try again now the work Internet connection is work....
Damn! There it goes again for the brazillionth time this week.
Oh! It's back up so I'd better type quickly.

If I set Opera to identify as Internet Explorer then I get the same results.
If I set it to identify as itself I get a more accurate result.

Personally I wouldn't bother trying to work out what browser is being used.
It's not reliable.
Sep 30 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Ted Byers | last post by:
I am looking for a java applet that provides the main capabilities of a web browser, not only displaying web pages properly, but supporting the various client side processing capability such as...
12
by: AMC | last post by:
Hi, I need to code an asp based browser sniffer. It needs to detect if a browser can support css and if not redirect to a different site. Does anyone have sample code that does this? thx
4
by: John Bowman | last post by:
Hi, How can I disable the right click capability of the Web Browser control that's on a form? I only want it to display the HTML, w/ no popup menu. TIA, -- John C. Bowman
1
by: Lance | last post by:
Hi, Is there a way to tell if a browser is currently capable of javascript? ie if the user has disabled it or not? I understand that the Request.Browser.JavaScript property will tell if a...
3
by: ms | last post by:
Hi Everyone, You all would be aware of the fact that we boast about .net supporting multiple web browsers. I hope we have all experienced that our screen layouts look different in every other...
4
by: Paul W | last post by:
Hi - can someone point me to info on the issues/resolutions of supporting the safari browser? To help me understand, if I was developing pages in say FrontPage, what attributes would I set for...
5
by: Bill Cohagan | last post by:
I'm having some serious difficulties with my ASP.Net 2.0 app rendering in Safari 2.0.3. The most immediate problem is that the menu control doesn't seem to work at all, particularly the use of...
7
by: dejavue82 | last post by:
Dear Asp.net users, I have seen some people comment that their asp.net websites render differently with various web browsers. Are they doing somthing wrong? In particilar, 1) I am wondering...
4
by: trpost | last post by:
I am looking for a script using javascript to pull browser information including, browser type and version, OS info, plugins (flash, acrobat, media player, etc), java version, etc. that will work...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.