Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Browser type detection

Status
Not open for further replies.

KnightCoder

Programmer
Jan 30, 2001
16
0
0
GB
Hi guys i am having problem with my ASP script.

i have this code

Set MyBrow=Server.CreateObject("MSWC.BrowserType")
if (MyBrow.javascript = False) then
response.redirect("nojavascript.asp")
end if

to see if the incoming broswer has javascript enabled

this works fine with IE but when i try with netscape and turn off javascript. it say javascript = true.

when it should be false.

Is it beacuse the MSWC.BrowserType object that i am creating is only looking at IE preferences?

if so,
is their a generic object for netscape and IE that i can create to see if the browser being used has javascript enabled?

Thanks in advance!
 
and i am using netscape 4.08 for testing this out
 
It seems that I heard once that the Browser Capabilities doesn't tell you if it is turned off for the specific browser installation - only if that browser supports Javascript.

Just a guess!
 
You probably need to update your browscap.ini file. There are several floating around out there, some work better than others. The file defines things like javascript by reading the http header sent from the client and then parsing the ini file to find that browser. Basically it sets these things based on what settings the browser has without extra patches.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top