•
•
•
•
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 374,461 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,765 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: 2416 | Replies: 1
![]() |
•
•
Join Date: Feb 2002
Location: Lawn Guylen, NY
Posts: 10,873
Reputation:
Rep Power: 32
Solved Threads: 108
Unfortunately you can't make a hit counter in either JavaScript or DHTML (and I'm assuming that's what you wanted to do, since you posted in the JavaScript and DHTML forum). You see, a hit counter needs some way of keeping track of how many hits you've received so far - this can be either in a database or in a plain text file kept on the server. JS and DHTML are both client-side languages, which means they're executed in the web surfer's browser, and not on the server. Therefore, they don't have access to write to files.
Instead, they're used to do fancy menus and those types of ornamental bells and whistles. For a hit counter, you will need a server-side language such as PHP, for example.
Instead, they're used to do fancy menus and those types of ornamental bells and whistles. For a hit counter, you will need a server-side language such as PHP, for example.
Dani the Computer Science Gal
Do you run a computer-related website? Feature it in our niche link directory!
Do you run a computer-related website? Feature it in our niche link directory!
![]() |
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
•
•
•
•
DaniWeb JavaScript / DHTML / AJAX Marketplace
- ASP .NET hit counter? (ASP.NET)
- Please review my website (Website Reviews)
- Creating Hit Counters for a website (JavaScript / DHTML / AJAX)
- XP Styles or Winblinds - Performance hit? (Windows NT / 2000 / XP / 2003)
Other Threads in the JavaScript / DHTML / AJAX Forum
- Previous Thread: Problem with <div> height - Controlling flow from center div
- Next Thread: Creating flyout menu



Linear Mode