Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - server side script not running in Netscap
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

server side script not running in Netscap

 Post Reply Post Reply
Author
vince36 View Drop Down
Newbie
Newbie


Joined: 14 January 2005
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote vince36 Quote  Post ReplyReply Direct Link To This Post Topic: server side script not running in Netscap
    Posted: 14 January 2005 at 3:50pm
Hi,

I have the below code in an asp page. When I run this page in IE or Opera it
correctly displays the header info and does not redirect me to 'test.html'.
However, when I run this in Netscape it goes straight to the redirect page
'test.html' which indicates that javascript is not enabled (it is enabled) and it also does
not display the header info. Can someone tell me why this is happening?

<%@ Language=VBScript%>
<%'get header info
Response.Write Request.ServerVariables("HTTP_USER_AGENT")

'detect javascript
Set bc = Server.CreateObject("MSWC.BrowserType") %>
Browser Name: <%=bc.browser %>
Browser Version: <%=bc.version%>

<%
if (bc.javascript = FALSE) then
 response.write("no javascript")
 response.Redirect("Test.html")
else
 response.write("has javascript")

end if
set bc=nothing
%>
Back to Top
dpyers View Drop Down
Senior Member
Senior Member


Joined: 12 May 2003
Status: Offline
Points: 3937
Post Options Post Options   Thanks (0) Thanks(0)   Quote dpyers Quote  Post ReplyReply Direct Link To This Post Posted: 15 January 2005 at 6:49pm
Are you running this from your local machine with iis installed or from a remote server?
 
MSWC.BrowserType is an ActiveX control that comes with IIS. I think the problem might be either Netscape support for ActiveX If you're running from a local IIS server, or perhaps NS references a different browsercap.ini file.
 
EDIT: Does NS print the Browser type and version?
 
.
 


Edited by dpyers - 15 January 2005 at 6:50pm

Lead me not into temptation... I know the short cut, follow me.
Back to Top
vince36 View Drop Down
Newbie
Newbie


Joined: 14 January 2005
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote vince36 Quote  Post ReplyReply Direct Link To This Post Posted: 15 January 2005 at 7:07pm
Well, NS isn't printing the browser type and version so I'm wondering why.
 
I was also thinking that the browsecap.ini may be outdated but I don't think that should affect the http_user_agent info. The page is running on a remote server on IIS.
 
Any ideas would be greatly appreciated.
 
 
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.