RSS Forums RSS
Please support our JavaScript / DHTML / AJAX advertiser: Lunarpages Web Hosting

hit counters

Join Date: Feb 2002
Location: Lawn Guylen, NY
Posts: 11,032
Reputation: cscgal is just really nice cscgal is just really nice cscgal is just really nice cscgal is just really nice cscgal is just really nice 
Rep Power: 33
Solved Threads: 117
Admin
Staff Writer
cscgal's Avatar
cscgal cscgal is online now Online
The Queen of DaniWeb

Re: hit counters

  #2  
May 23rd, 2005
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.
Dani the Computer Science Gal
Reply With Quote  
Forums | Blogs | Tutorials | Code Snippets | Whitepapers | RSS Feeds | Advertising
All times are GMT -4. The time now is 5:25 am.
Newsletter Archive - Sitemap - Privacy Statement - Contact Us
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC