Groups | Blog | Home
all groups > inetserver asp general > september 2005 >

inetserver asp general : Browser Capability


Danny NO[at]SPAM Kendal
9/29/2005 11:44:40 AM
[quoted text, click to view]

<snip>

[quoted text, click to view]

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%>

Prabhat
9/29/2005 3:07:56 PM
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

Prabhat
9/29/2005 4:31:40 PM

[quoted text, click to view]

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

Danny NO[at]SPAM Kendal
9/30/2005 10:20:02 AM
[quoted text, click to view]

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.

AddThis Social Bookmark Button