in reply to How to detect which page loaded script

HTTP is stateless. A very unclean option would be to store the last page in a session, but that's really very unclean. If you could tell what functionality you want to gain with this, maybe someone knows a better solution to your problem.

Ordinary morality is for ordinary people. -- Aleister Crowley
  • Comment on Re: How to detect which page loaded script

Replies are listed 'Best First'.
Re^2: How to detect which page loaded script
by Anonymous Monk on Dec 07, 2005 at 19:17 UTC
    Someone told me JS could do this, unfortunately I don't know how to pass the information.

    They said window.location would hold the URL. Anyone know how to get a javascript to pass this to my script?

      You still haven't said what you're up to. There may be possibilities with javascript, but what if it's disabled/not working/faked?

      Ordinary morality is for ordinary people. -- Aleister Crowley
        Hi.

        Sorry. This is for a users online script. It shows the number of users online just fine but I want an admin log to see where people are RIGHT NOW. It shows the IP addy and the URL of the page each visitor to the site is on right now.

        If JS is disabled and nothing gets passed to the script, no big deal. But it would work for most people and that's definitely good enough.