JavaScript Hit counter

This is a discussion on "JavaScript Hit counter" within the JavaScript Forum section. This forum, and the thread "JavaScript Hit counter are both part of the Program Your Website category.



Go Back   Webforumz.com > Main Forums > Program Your Website > JavaScript Forum

Notices


Closed Thread
 
LinkBack Thread Tools
  #1 (permalink)  
Old Oct 22nd, 2003, 19:38
New Member
Join Date: Oct 2003
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
JavaScript Hit counter

Hi Everybody!!!
I m new on this site & also new in web programming ..
..I want help can anyone tell me how to make a javascript hit counter..Reply me soon..Bye

  #2 (permalink)  
Old Oct 23rd, 2003, 07:07
Most Reputable Member
Join Date: Jul 2003
Posts: 1,856
Thanks: 0
Thanked 0 Times in 0 Posts
Hi Reeno!

Welcome to the forums.

Ok, I'll tell you now that it's impossible to make a Javascript hit counter.

The reason is this: Javascript runs only in the browser of the person visiting your site. It can only make changes on the visitor's computer. So while it's possible to count how many times you, personally, have visited the site it's not possible to count how many times ANYONE has seen the site as javascript has no way of accessing the server on which your site is stored.

If you want to make your own hitcounter then I would suggest using a backend technology such as ASP, PHP, CGI.

If you're not into that(you did say you were new to web programming!) there are many free hitcounters all over the net.

A quick search on google:
Gives you this
With this item most appropriate
  #3 (permalink)  
Old Oct 23rd, 2003, 07:33
Highly Reputable Member
Join Date: Aug 2003
Location: Australia
Posts: 662
Thanks: 0
Thanked 0 Times in 0 Posts
Just a little advice on hit counters...

Yes Sirkent is correct about Javascript, but... Make sure that you get your Counter from a site that you know is used a lot, cause lately most free counter sites have been cancelling this service. So.. get a good one, not someone who's site looks like they barely can do anything other than that, cause you will have to start over very soon. thats it.
  #4 (permalink)  
Old Oct 23rd, 2003, 12:18
New Member
Join Date: Oct 2003
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Hey!! Sirkent & kulegamr
Well first of all thnx to both of u to reply to my topic.Well u both says tht it is impossible to make a hit counter in javascript.
Actually i got assignment to make tht hit counter by using javascript.My teacher gave me hint tht we can make a hit counter in javascript by using loops in javascript code.Well i also dont know how to do tht So, i think tht u both r right it it is impossible to make a hit counter in javascript..
Thnx once again.
Bye & have good time.
  #5 (permalink)  
Old Oct 23rd, 2003, 17:29
Most Reputable Member
Join Date: Jul 2003
Posts: 1,856
Thanks: 0
Thanked 0 Times in 0 Posts
It's not impossible to make javascript that counts you hitting the same page on ONE machine, but it is impossible to count everyone who hits your page as you can't store stuff on the server with javascript.
  #6 (permalink)  
Old Oct 23rd, 2003, 20:18
Highly Reputable Member
Join Date: Aug 2003
Location: Australia
Posts: 662
Thanks: 0
Thanked 0 Times in 0 Posts
Well I know it's possible in Action Script. But I have searched all JavaScript sites and can't find a hit counter. Sorry. But... I do know that you could use Tabular Data Control to do this.. but the file that the Javascript would be reading wouldn't be javascript.
Closed Thread

Tags
javascript, hit, counter

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Age Counter acrikey JavaScript Forum 4 Jun 2nd, 2008 12:37
Counter confused Website Planning 6 May 21st, 2007 03:27
hit counter? skyfire400 Web Page Design 6 Mar 7th, 2006 14:00
A PHP web counter? k3nshin PHP Forum 19 Feb 19th, 2004 22:35
print "$counter times 2 is ".($counter*2)."<br>" gwx03 PHP Forum 6 Dec 10th, 2003 10:50


All times are GMT. The time now is 19:08.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43