Results 1 to 3 of 3

Thread: Javascript Counter Needed

  1. #1
    Join Date
    Apr 2016
    Thanked 0 Times in 0 Posts

    Default Javascript Counter Needed

    Does anyone know of a really good javascript event (i.e. onclick) counter that stores the count in a unique file?

    I need one that I can invoke from either html or a javascript routine, that reads a file, increments the count, and stores the new count back in the file, and not interfere with the operation of the html code.

    I've tried gcount, but it takes the focus away from the html page while it's doing its thing.

    The counter doesn't necessarily have to be javascript, itself, although, that would be nice.


  2. #2
    Join Date
    Mar 2011
    Thanked 108 Times in 106 Posts
    Blog Entries


    Hey Robert.
    I'm a little bit confused by what you're asking sorry.

    Generally you can't read/write files on the clients computer with Javascript. You can store information in cookies/web storage though. Is that what you're looking for?

    What is gcount sorry? I've not heard of that in relation to Javascript.

    Also could you explain why you want this? It might be easier to help if we know exactly what you're looking to do.


  3. #3
    Join Date
    Apr 2016
    Thanked 0 Times in 0 Posts



    Sorry if I wasn't clear. I'm looking for an event counter that will run on the server, and can be invoked from a javascript function. Perhaps I should have said hit counter, although I want to use it in a more general way. I want to be able to specify the file that gets updated, so I can count events such as particular onclicks.

    gcount is a php counter that I found on php junk yard. It works, but takes the focus away from the webpage when it updates the file. It only does that if invoked from javascript. If it's invoked from html it doesn't do that.

    Hope this clears things up.


Similar Threads

  1. How to add a counter on Facebook [Script needed]
    By Jack in forum General Paid Work Requests
    Replies: 2
    Last Post: 11-17-2017, 03:46 AM
  2. Need help with counter in javascript
    By Columbo in forum JavaScript
    Replies: 2
    Last Post: 08-13-2009, 02:54 PM
  3. Counter needed
    By auriaks in forum PHP
    Replies: 2
    Last Post: 08-07-2009, 02:18 PM
  4. Resolved JavaScript counter
    By robin9000 in forum JavaScript
    Replies: 0
    Last Post: 02-05-2009, 11:52 PM
  5. Javascript-based counter
    By terkini in forum JavaScript
    Replies: 1
    Last Post: 11-28-2006, 09:34 AM


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts