Using Javascript to write out documents

R

Ralph Krausse

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
 
C

Chris Hope

Ralph said:
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
 
R

Reply Via Newsgroup

Ralph said:
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top