Jump to content

Buttons and Link Counters


DanielFinds
 Share

Recommended Posts

:) Hello, I'm new here, and also somewhat new to Javascript. I know html, and I can create decent webpages, but I'm no Grand Master or anything and I need help.I work at a library at a small college, and my boss wants a link from our library homepage to a database we can access on a trial basis. She would like this link to be a button, and to be a counter so we know how many times students, faculty, etc., have gone from the link on the library homepage to the database webpage. The providers of the database state in no uncertain terms that they don't compile usage statistics, so we need to. What I want is a counter that makes an entry in a log unseen to the user every time a user clicks the link from the library homepage to the database homepage.Is this doable? I've been told it's something doable in Javascript, but I've been up and down all the tutorials and examples on w3c with no luck.Thanks
Link to comment
Share on other sites

this is possible, but probably not with javascript. it would probably take a server-side scripting languages such as php or asp because it would have to save to an external file.LG

Link to comment
Share on other sites

scott, that only counts how many people have been there though, not clicks, right?LG

What if they save the database homepage in their favourites and bypass the library homepage? They could visit the database homepage and you would have no record.In any case you could adjust the script to find out what page the user came from, if it's from the library add 1 if not don't $_SERVER["HTTP_REFERER"]
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...