Determine how many times a link is clicked?

  • closer2void
  • Born
  • Born
  • No Avatar
  • Joined: Jun 13, 2004
  • Posts: 4
  • Loc: Scotland, United Kingdom
  • Status: Offline

Post June 13th, 2004, 5:38 am

Hey guys, I'm new, just posted over at the introduce yourselves thing. Anyway I was wondering if anyone could help me. I'm trying to find a script or code or whatever for my site that determines the amount of times a link has been clicked? I've looked around the web and the forum for stuff on this but can't seem to find it, maybe I'm just not saying it the right way or something, any help would be great :D
  • Anonymous
  • Bot
  • No Avatar
  • Joined: 25 Feb 2008
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post June 13th, 2004, 5:38 am

  • Sabu
  • Beginner
  • Beginner
  • No Avatar
  • Joined: May 15, 2004
  • Posts: 49
  • Status: Offline

Post June 13th, 2004, 5:56 am

Right, there are a few basic points to remember when asking a question like this. At the moment I can only thing of one, but I'm sure there are more.

1) State your system, supported languages (PHP, ASP) and database format (if applicable)
  • closer2void
  • Born
  • Born
  • No Avatar
  • Joined: Jun 13, 2004
  • Posts: 4
  • Loc: Scotland, United Kingdom
  • Status: Offline

Post June 13th, 2004, 6:17 am

okay err sorry :lol: ummh website running on a Linux server. Use PHP for the pages on my site, use MySQL. Don't know much about all that system type stuff, but i think thats the basics
  • gohostme
  • Newbie
  • Newbie
  • No Avatar
  • Joined: Jun 11, 2004
  • Posts: 6
  • Status: Offline

Post June 13th, 2004, 11:57 pm

Just go to hotscripts.com , get some scripts and look how they're done.
That may help... It always helps :)
  • s15199d
  • Expert
  • Expert
  • User avatar
  • Joined: Feb 20, 2004
  • Posts: 524
  • Loc: NC, USA
  • Status: Offline

Post June 14th, 2004, 6:12 am

It wouldn't be too hard to creat a lil javascript function...where:

Code: [ Select ]
function(){
var i=0;
this.form.buttonname.onClick()
   i++
}
  1. function(){
  2. var i=0;
  3. this.form.buttonname.onClick()
  4.    i++
  5. }


that variable should tell you the number of times that button is clicked because it adds one every time you click. Or it should I haven't tested it. I don't know what you want to do w/ that # but at least this should compile the # for you.
Image
Give a man a fish he eats for a day. Teach a man to fish he eats for a lifetime.
  • Tannu4u
  • Proficient
  • Proficient
  • User avatar
  • Joined: Apr 29, 2004
  • Posts: 480
  • Loc: India
  • Status: Offline

Post June 14th, 2004, 11:47 am

on the other han u can add a field to the database and add a function to ur file which increments the count of the field in the database whenever the link is clicked.U call that function whenever the link is clicked this will give u the total number of clicks on that link by retrieving the value from the database.....Bye
Amit
My Blog http://www.amityadav.name

Post Information

  • Total Posts in this topic: 6 posts
  • Users browsing this forum: Zealous and 203 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
cron
 

© 2011 Unmelted, LLC. Ozzu® is a registered trademark of Unmelted, LLC.