Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > Using Javascript to write out documents

Reply
Thread Tools

Using Javascript to write out documents

 
 
Ralph Krausse
Guest
Posts: n/a
 
      04-06-2004
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
 
Reply With Quote
 
 
 
 
Chris Hope
Guest
Posts: n/a
 
      04-06-2004
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/
 
Reply With Quote
 
 
 
 
Reply Via Newsgroup
Guest
Posts: n/a
 
      04-06-2004
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
 
Reply With Quote
 
 
 
Reply

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 Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
No more stuff on C:\Documents and Settings\[User]\My Documents\Visual Studio 2005\ craigkenisston@hotmail.com ASP .Net 1 10-18-2006 03:31 PM
Write abiword documents using python sebb Python 3 10-28-2003 06:43 AM
How to open a new console and write something out write printf() Peter Hansen C++ 1 08-24-2003 11:49 AM
How to open a new console and write something out write printf() Peter Hansen C Programming 1 08-24-2003 11:49 AM



Advertisments