Re: A simple Click-counter

by "Rebecca Campbell" <nerdygirl(at)nerdygirl.com>

 Date:  Tue, 27 Mar 2001 14:37:27 -0800
 To:  "Ben Russo" <i.am.ben(at)sympatico.ca>,
"HWG Techniques" <hwg-techniques(at)hwg.org>
  todo: View Thread, Original
you can't do this with regular client-side javascript, since the counter
will only be incremented on each user's computer.  i haven't done this, but
i think it would be possible to write a server-side javascript that writes
to a cookie.  your best bet, though, would be to use cgi or another back-end
language to do this, and store the number in a plain text file or something
like that.  it seems to me that modifications to code for a page counter
would work...

hth,
rebecca
http://www.nerdygirl.com

-----Original Message-----
From: Ben Russo <i.am.ben(at)sympatico.ca>
To: HWG Techniques <hwg-techniques(at)hwg.org>
Date: Tuesday, March 27, 2001 2:34 PM
Subject: A simple Click-counter


Hello everyone!

Here's a javascript problem = (yay!)...

I want a button to, when clicked, = increase a=20 counter by one.  Very
simple.  Click the button, the number = goes from=20 1 to 2...  Click it
again, 2 goes to 3...

"Gee Ben, if it's soo simple, why can't = you figure=20 it out?"

Well, maybe not that simple...  :=20 )

BUT WAIT!!!  The information has = to be saved=20 as part of the page, so
that other users can see that someone clicked it = to=20 2.  In other
words, this might mean a little more than = javascript. =20 CGI?

does anybody know what I'm talking = about?  and=20 can anyone help me?

Thanks a lot...

Ben

HWG hwg-techniques mailing list archives, maintained by Webmasters @ IWA