DanielFinds Posted April 6, 2006 Share Posted April 6, 2006 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 More sharing options...
Little Goat Posted April 6, 2006 Share Posted April 6, 2006 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 More sharing options...
scott100 Posted April 6, 2006 Share Posted April 6, 2006 Yeah definently not possible with javascript, try something like php. Update a counter in a text file each time the page is accessed. Link to comment Share on other sites More sharing options...
DanielFinds Posted April 6, 2006 Author Share Posted April 6, 2006 Yeah definently not possible with javascript, try something like php. Update a counter in a text file each time the page is accessed.<{POST_SNAPBACK}> Forgive my ignorance, but how do I do that? Link to comment Share on other sites More sharing options...
Little Goat Posted April 6, 2006 Share Posted April 6, 2006 http://evolt.org/how_to_count_clicks_in_your_websitethis site shows how to do it with php and mysql.LG Link to comment Share on other sites More sharing options...
DanielFinds Posted April 6, 2006 Author Share Posted April 6, 2006 http://evolt.org/how_to_count_clicks_in_your_websitethis site shows how to do it with php and mysql.LG<{POST_SNAPBACK}> Thanks! Link to comment Share on other sites More sharing options...
scott100 Posted April 6, 2006 Share Posted April 6, 2006 You could do it with a simple text file Link to comment Share on other sites More sharing options...
Little Goat Posted April 6, 2006 Share Posted April 6, 2006 You could do it with a simple text file<{POST_SNAPBACK}> scott, that only counts how many people have been there though, not clicks, right?LG Link to comment Share on other sites More sharing options...
scott100 Posted April 6, 2006 Share Posted April 6, 2006 scott, that only counts how many people have been there though, not clicks, right?LG<{POST_SNAPBACK}> 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 More sharing options...
Little Goat Posted April 6, 2006 Share Posted April 6, 2006 yes, but we're trying to count clicks here.LG Link to comment Share on other sites More sharing options...
scott100 Posted April 6, 2006 Share Posted April 6, 2006 yes, but we're trying to count clicks here.LG<{POST_SNAPBACK}> Darn, i think you may have me on this one partner Link to comment Share on other sites More sharing options...
Little Goat Posted April 6, 2006 Share Posted April 6, 2006 well thanks scott, now I know that I dont have to use a JAVA counter. LG Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now