| | |
hit counters
Please support our JavaScript / DHTML / AJAX advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
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 
Follow my Twitter feed! twitter.com/DaniWeb
And if you're interested in Internet marketing there is twitter.com/DaniWebAds

Follow my Twitter feed! twitter.com/DaniWeb
And if you're interested in Internet marketing there is twitter.com/DaniWebAds
![]() |
Similar Threads
- 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)
Other Threads in the JavaScript / DHTML / AJAX Forum
- Previous Thread: Problem with <div> height - Controlling flow from center div
- Next Thread: Creating flyout menu
| Thread Tools | Search this Thread |
acid2 ajax ajaxexample ajaxjspservlets array beta box browser captchaformproblem cart child close codes column css date debugger decimal dependent design disablefirebug dom download element embed engine enter error events ext file firefox focus form forms frameworks getselection google gwt gxt hiddenvalue highlightedword hint html ie7 ie8 iframe index java javascript javascripthelp2020 jquery jsp jump libcurl listbox maps masterpage math media menu microsoft mimic mp4 onerror onmouseoutdivproblem onmouseover onreadystatechange paypal pdf php position post problem programming prototype rated rating redirect safari scale scriptlets scroll search security select software star starrating synchronous toggle unicode variables w3c web webservice window windowofwords xml \n






