469,360 Members | 1,775 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,360 developers. It's quick & easy.

Using Javascript to write out documents

I want to create my own kind of counter, for myself. I have a resume
page on my site. I want to know how many people go there but dont want
to 'go there' myself because I don't want to increase the hit counter
on that page. So I want to create a html page (that I only know about)
that hold a hit count variable. When someone goes to my resume page,
on the OnLoad() I want to go get that variable, increment it and write
it out. So this function in the OnLoad on my resume page has to get a
variable from a different page, increment it, and write it back out to
that page it go it from in the first page.
Can this be done?

Thanks
Ralph Krausse
www.consiliumsoft.com
Use the START button? Then you need CSFastRunII...
A new kind of application launcher integrated in the taskbar!
ScreenShot - http://www.consiliumsoft.com/ScreenShot.jpg
Jul 23 '05 #1
2 1451
Ralph Krausse wrote:
I want to create my own kind of counter, for myself. I have a resume
page on my site. I want to know how many people go there but dont want
to 'go there' myself because I don't want to increase the hit counter
on that page. So I want to create a html page (that I only know about)
that hold a hit count variable. When someone goes to my resume page,
on the OnLoad() I want to go get that variable, increment it and write
it out. So this function in the OnLoad on my resume page has to get a
variable from a different page, increment it, and write it back out to
that page it go it from in the first page.
Can this be done?


You can't do this with Javascript - imagine what fun crackers could have if
you could remotely write to files on your webserver with Javascript!

You would need to do something like this with a server-sided language such
as PHP, Perl, ASP/VBScript etc.

Chris

--
Chris Hope
The Electric Toolbox Ltd
http://www.electrictoolbox.com/
Jul 23 '05 #2
Ralph Krausse wrote:
I want to create my own kind of counter, for myself. I have a resume
page on my site. I want to know how many people go there but dont want
to 'go there' myself because I don't want to increase the hit counter
on that page. So I want to create a html page (that I only know about)
that hold a hit count variable. When someone goes to my resume page,
on the OnLoad() I want to go get that variable, increment it and write
it out. So this function in the OnLoad on my resume page has to get a
variable from a different page, increment it, and write it back out to
that page it go it from in the first page.


Nope - not javascript - though you'd probably need to use it for some
part of the result.

Javascript is client side - that means it only effects the PC that is
visiting the website (and even then, only if javascript is
enabled/supported).

Thus... if you could use javascript to store a value, it would only be
stored on the PC visiting the website - meaning one value would be
stored on your PC when you'd visit and another, likely different value
would be stored on someone elses PC when they would visit.

You need something that allows you to record the visits on the server,
not the client (PC). There are loads of free website counters out there
that you could use that have a seperate page that you could visit to get
the result - they are server based meaning you put something in your
website (perhaps an image) which, when displayed on a visitors PC has
also made a mark on some server out there on the internet recording
their visit.

hope that helps some,
randelld
Jul 23 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by North Country Boy | last post: by
10 posts views Thread by Tank | last post: by
4 posts views Thread by JesusFreak | last post: by
1 post views Thread by questionr | last post: by
5 posts views Thread by Lucian Sandor | last post: by
136 posts views Thread by Matt Kruse | last post: by
47 posts views Thread by Bonj | last post: by
24 posts views Thread by Aaron Gray | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by suresh191 | last post: by
1 post views Thread by Marylou17 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.