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

Hit Count via HTML Coding Only 1

Status
Not open for further replies.

dwong

Programmer
Aug 8, 2001
20
AU
Hi Everyone,

I have an unusual request. We run a Employee Satisfaction group in our company and we don't have any budget to create websites both on the Internet and our Intranet. So, we decided to create our own Web page (basically a HTML document) residing on the LAN common drive.

We want to have a hit count facility. Because the page is on a common drive, my understanding is:
(1) Unable to join Hit Count websites (ie. sites that keeps track of counts for you), as our HTML doc is not on the Internet.
(2) Unable to use ASP.

If anyone knows how I can implement a crude hit count using native HTML or Javascript code that would be great! I just need to keep the count on a file on the common drive.

Sample codes would be appreciated.

Thanks and regards...
 
Hmmm... Not sure. I've only ever used it with fully qualified paths, not network paths. I can't remember anything from the documentation explicitly saying you couldn't do this, but - then again - I don't think anything in the documentation says you can do this either.

 
You can--you just forgot to backslash the first part. Try this:
function GetCount()
{
var fso, f, r;
var ForReading = 1, ForWriting = 2;
fso = new ActiveXObject("Scripting.FileSystemObject");
f = fso_OpenTextFile('\\\\COMPUTERNAME\\FILE1\\COMMON\Analytics\\Website\\counter.txt', ForReading);
r = f.ReadLine();
return(r);
}

-----------------------------------------------------------
RISTMO Designs
Arab Church
Reference Guides
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top