Wrox Programmer Forums
|
BOOK: Beginning Dreamweaver MX/MX 2004 MX ISBN: 978-0-7645-4404-0; MX 2004 ISBN: 978-0-7645-5524-4
This is the forum to discuss the Wrox book Beginning Dreamweaver MX by Charles E. Brown, Imar Spaanjaars, Todd Marks; ISBN: 9780764544040
Please indicate which version of the book you are using when posting questions.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning Dreamweaver MX/MX 2004 MX ISBN: 978-0-7645-4404-0; MX 2004 ISBN: 978-0-7645-5524-4 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 November 28th, 2005, 06:02 AM
Authorized User
 
Join Date: Aug 2005
Posts: 96
Thanks: 0
Thanked 0 Times in 0 Posts
Default Re: Hit Counter

Hey to all.

Can anyone suggest why the hit counter I have created on page 270 is not working?

I have created the global.asa file. (All the text is black, unlike the normal html files you see all coloured with the different scripts).
Also created the hitcounter.asp file and it seems to be the same as in the book.

It worked the 1st time I created it.

Then i copied the files in to my own folders and I can not get it working. I tried re creating the files to their original status as it reads in the book, but still nothing??

Thanks

Mally.


 
Old November 28th, 2005, 02:55 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi Mally,

Are you sure the code in global.asa is placed within server side script tags? And is the folder that holds the global.asa file marked as an application in IIS?

Can you post the code for the global.asa file if the two questions above don't solve the problem?

Cheers,

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
While typing this post, I was listening to: Their Law [Featuring Pop Will Eat Itself] by The Prodigy (Track 3 from the album: Music For The Jilted Generation) What's This?
 
Old November 29th, 2005, 03:31 AM
Authorized User
 
Join Date: Aug 2005
Posts: 96
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hey there Imar,.

The code I have in the global.asa file starts with,

<script language="vbscript" runat="server">
and ends with,
</script>.

Id say thats waht you meant by the code being placed within server side script tags?

In regards to the folder that holds the global.asa file being marked as an application in IIS? Im not sure about that.

I will check.

Thanks.

Mally.


 
Old November 29th, 2005, 03:42 AM
Authorized User
 
Join Date: Aug 2005
Posts: 96
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks again Imar, the application was not marked as an application in IIS. I re installed everything but forgot to do that.

Mally.


 
Old December 29th, 2005, 03:10 AM
Authorized User
 
Join Date: Aug 2005
Posts: 96
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hey there, sorry re the delay in getting back re this subject.

I did re install IIS and also made sure that the tags were on either end of the code. Still get the same thing. Have tried a few versions of this global.asa file in a few Wrox books and get the same thing.

Currently I have done the following. I hope the detail helps.

1st: Created a Global.asa file with the following code.
<script language="vbscript" runat="server">
Sub Session_OnStart
Session("StartTime") = Now()
Application.Lock
Application("TotalNumberOfUsers") = _
Application("TotalNumberOfUsers") + 1
Application("CurrentNumberOfUsers") = _
Application("CurrentNumberOfUsers") + 1
Application.Unlock
End Sub
Sub Session_OnEnd
Application.Lock
Application("CurrentNumberOfUsers") = _
Application("CurrentNumberOfUsers") - 1
Application.Unlock
End Sub
Sub Application_OnStart
Application("EMailAddress") = "[email protected]"
End Sub
Sub Application_OnEnd
End Sub
</SCRIPT>

This asa file is in the following directory.
http://localhost/timber/session/global.asa
The session folder is marked as an application in IIS.

Secondly I have entered the following into my search page. Have also listed the directory of this folder. The reason I have this in my search.asp page is that I want people that login to see how many are logged in.

<body>
There have been <B><%= Session("VisitorID")%></B> total visits to this site.<BR>
You are one of <B> <%= Application("Active")%></B> active visitors.<BR>
Your session started at <%= Session("Start") %>
</p>
</body>

http://localhost/timber/html/search.asp

Let me know if I can supply more details.

Mally.







Similar Threads
Thread Thread Starter Forum Replies Last Post
A Hit Counter, PLEASE HELP !!!!! ARD_40 BOOK: Beginning PHP4/PHP 5 ISBN: 978-0-7645-4364-7; v5 ISBN: 978-0-7645-5783-5 1 April 23rd, 2006 06:25 AM
Hit Counter Help! NeilS21 Classic ASP Databases 4 April 29th, 2005 06:59 AM
hit counter gumgak Classic ASP Basics 2 November 2nd, 2003 12:44 AM
Hit Counter mateenmohd HTML Code Clinic 7 September 28th, 2003 07:22 AM





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