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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

simple hit counter won't work for some reason

Status
Not open for further replies.

scroce

MIS
Nov 30, 2000
780
US
I did this:

in global.asa:

<SCRIPT LANGUAGE=VBScript RUNAT=Server>

Sub Application_OnStart()
Application(&quot;counter&quot;)=0
End sub

Sub Session_OnStart()
iCount = Application(&quot;Counter&quot;)
iCount = iCount+1
Application(&quot;Counter&quot;)=iCount
Session(&quot;Counter&quot;)=iCount
end sub

</SCRIPT>

and in a file called Example.asp, it looks like:

<% Option Explicit %>
<html>
<head>
<title>
</title>
</head>
<body>
<h1>Welcome</h1>
You are visitor <%=Session(&quot;counter&quot;)%><br>
out of <%=Application(&quot;counter&quot;)%>
</body>
</html>

but when the page is pulled up through PWS, the places where the numbers should be are blank, there is no error being generated. It seems like the application/session variables aren't being filled.

What is out of whack here? How much water would there be in the ocean if it weren't for sponges?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top