Wrox Programmer Forums
|
Classic ASP Professional For advanced coder questions in ASP 3. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Professional section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 11th, 2003, 12:54 PM
Registered User
 
Join Date: Sep 2003
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default appMinorVersion

Good afternoon ASp forum,

Our company has built a VPN for 2200 hospitals in 50 states.
One of the features of our about to be released catalog works
depending on which Service Pack is installed on the client.
We would like to detect the OS, browser, browser version and
service pack number so we can notify our clients who need upgrades.
We can detect the service pack number on the client using the
Javascript object Navigator.appMinorVersion but cannot pass this data
from Javascript into ASP where the data would be captured to a database.
In the code for the page below marked ASPJavascriptH.asp the Javascript works but the ASP does not. Our conclusion is server side and client side objects cannot be mixed.

We can get the OS, browser, and browser version using ASP
<%= Request.ServerVariables("HTTP_USER-AGENT") %>
but can find no way of getting the service pack number. Is there an object in the Microsoft world that parallels the Javascript object Navigator.appMinorVersion?

++++++++++++++
ASPJavascriptH.asp

<html>
<head>
<title>Browser Information Detection Script</title>
<SCRIPT LANGUAGE= Javascript>
var Browser_Name = navigator.appMinorVersion;
</SCRIPT>
<script language="javascript" runat="server">
function BrowserValue()
{
var Browser_Name2 = navigator.appMinorVersion;
Response.Write(Browser_Name2)
}
</script>
</head>
<body>
 <SCRIPT language=JavaScript>
 document.write("Your Browser is: <b>"+ Browser_Name +"</b><br>");
 </SCRIPT>
<p>Result: <%BrowserValue()%></p>
</body>
</html>

 
Old September 12th, 2003, 07:50 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 217
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to mega
Default

You can't use client-side DOM from a server. What you need to do is send the client-side information to the server using POST or GET. Also you can't pass a javascript object to a non javascript language like vbscript. I don't know about jscript, but I wouldn't bet on it. If you look into the server object try use
For Each Variable In Request.ServerVariables
  Response.Write(Variable & " <b>" & Request.ServerVariables(Variable) & "</b><br />")
Next
You might find something useful like the OS version number...

Regards - Jon









Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.