•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the JavaScript / DHTML / AJAX section within the Web Development category of DaniWeb, a massive community of 401,441 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,888 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our JavaScript / DHTML / AJAX advertiser: Lunarpages Web Hosting
Views: 4265 | Replies: 2
![]() |
•
•
Join Date: Apr 2005
Posts: 5
Reputation:
Rep Power: 0
Solved Threads: 0
HI!!,
can anybody tell me how to create a hit counter using Javascript.
The hit counter should increment a number stored in a file (on the site) each time a user visits it.
For reference such Hit Counters can be added to Websites built with Microsoft Frontapage (Tools -> Web Components -> Hit Counter).
can anybody tell me how to create a hit counter using Javascript.
The hit counter should increment a number stored in a file (on the site) each time a user visits it.
For reference such Hit Counters can be added to Websites built with Microsoft Frontapage (Tools -> Web Components -> Hit Counter).
•
•
Join Date: Dec 2004
Location: Lincoln Park, Michigan
Posts: 1,744
Reputation:
Rep Power: 7
Solved Threads: 107
Well, With javascript it is going to require you to use cookies. You send the browser a cookie, with the value as the number of visits. Next time they return, read the cookie, increment it, and over-write the cookie with the new value. In order to do something like this SERVER SIDE, you'll need a server side language, such as perl, php, or some other server side programming language.
![]() |
•
•
•
•
•
•
•
•
DaniWeb JavaScript / DHTML / AJAX Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
- Online Community Website/Social Networking site (Web Developers' Lounge)
- Please review my website (Website Reviews)
- website password protection (JavaScript / DHTML / AJAX)
- hit counters (JavaScript / DHTML / AJAX)
Other Threads in the JavaScript / DHTML / AJAX Forum
- Previous Thread: Accessing DOM Objects
- Next Thread: Urgent.....Dynamic Changes....



Linear Mode