Using Javascript to write out documents

Discussion in 'Javascript' started by Ralph Krausse, Apr 6, 2004.

  1. 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
    Ralph Krausse, Apr 6, 2004
    #1
    1. Advertising

  2. Ralph Krausse

    Chris Hope Guest

    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/
    Chris Hope, Apr 6, 2004
    #2
    1. Advertising

  3. 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 Via Newsgroup, Apr 6, 2004
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Peter Hansen
    Replies:
    1
    Views:
    383
    Joona I Palaste
    Aug 24, 2003
  2. Peter Hansen
    Replies:
    1
    Views:
    418
    Joona I Palaste
    Aug 24, 2003
  3. sebb
    Replies:
    3
    Views:
    364
  4. Replies:
    1
    Views:
    479
    Juan T. Llibre
    Oct 18, 2006
  5. Rob Knop
    Replies:
    1
    Views:
    282
Loading...

Share This Page