Using Javascript to write out documents

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Ralph Krausse

    #1

    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
    Ralph Krausse runs a software factory at Consiliumsoft, building software with AI agents, written plans, human review, and enterprise .NET, Angular, and Azure experience.

    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
  • Chris Hope

    #2
    Re: Using Javascript to write out documents

    Ralph Krausse wrote:
    [color=blue]
    > 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?[/color]

    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/

    Comment

    • Reply Via Newsgroup

      #3
      Re: Using Javascript to write out documents

      Ralph Krausse wrote:
      [color=blue]
      > 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.
      >[/color]

      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

      Comment

      Working...