Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New to the CF scene
    Join Date
    Mar 2004
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    How can i make a Counter in Java Script?

    How can i make a Counter in Java Script?
    But i need a counter who uses the minimal resurces!
    Thx!

  2. #2
    Senior Coder Nightfire's Avatar
    Join Date
    Jun 2002
    Posts
    4,280
    Thanks
    6
    Thanked 49 Times in 49 Posts
    You can't do one with javascript. You need a serverside language.

  3. #3
    Regular Coder
    Join Date
    Apr 2003
    Location
    Canada, Ontario, Mississauga
    Posts
    312
    Thanks
    0
    Thanked 0 Times in 0 Posts
    wrong language you are trying to use for counter. Try use php, jsp, or asp because they are server side language. JavaScript is client side.

    I use php, just create a cookie when visitor visit you site, use cookie as a flag.

    If visitor contains your counter cookie, then do nothing
    If user doesn't contain your counter cookie, then add 1 to your counter and create a cookie.

    I don't think you can use JavaScript to do counter, but not 100% sure.

  4. #4
    Senior Coder
    Join Date
    Feb 2004
    Posts
    1,206
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Before we bash DJAISI for wanting to use Javascript, first we should find out is wanting to be counted!

    So, DJAISI, what are you trying to count?

    Sadiq.


 

Posting Permissions

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