Determining the referring URL

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

    Determining the referring URL

    I have a page with frames. The left frame is a list of urls. The main frame
    is loaded based on the url that was clicked in the left frame.

    Is there a way for the main frame to tell which url was clicked in the left
    frame? I'd like to avoid having to use a name/value pair in the links in the
    left frame, which I'm currently doing. I'd prefer to use something similar
    to $_server('REFER ER') but I can't find anything that would list the
    referring url rather than the referring page.

    Thanks.


  • Erwin Moller

    #2
    Re: Determining the referring URL

    Jenkins wrote:
    [color=blue]
    > I have a page with frames. The left frame is a list of urls. The main
    > frame is loaded based on the url that was clicked in the left frame.
    >
    > Is there a way for the main frame to tell which url was clicked in the
    > left frame?[/color]

    Isn't that the page it just loaded?
    So if you click on your left frame on intro1.html-link, the page in the
    mainframe is intro1.html...
    Or am I missing something completely here?
    [color=blue]
    > I'd like to avoid having to use a name/value pair in the links
    > in the left frame, which I'm currently doing. I'd prefer to use something
    > similar to $_server('REFER ER') but I can't find anything that would list
    > the referring url rather than the referring page.
    >
    > Thanks.[/color]

    Regards,
    Erwin Moller

    Comment

    • Jenkins

      #3
      Re: Determining the referring URL

      The left frame loads a php file that selects and displays links from a mysql
      db. All the links in the left frame call the same page, showapps.php.
      Showapps.php has to determine which link was clicked and then selects info
      associated with that link.

      I'm currently hardcoding a name/value pair, i.e., ?cat=1, ?cat=2, etc, onto
      each link in the left frame. The showapps.php, which loads into the main
      frame, selects from a mysql db based on the value in the name/value pair.
      I'd like to just read the refering url the same way I can read the referring
      page and then determine which category to select.

      "Jenkins" <news@djenkins. nu> wrote in message
      news:AzSkb.8372 50$uu5.147934@s ccrnsc04...[color=blue]
      > I have a page with frames. The left frame is a list of urls. The main[/color]
      frame[color=blue]
      > is loaded based on the url that was clicked in the left frame.
      >
      > Is there a way for the main frame to tell which url was clicked in the[/color]
      left[color=blue]
      > frame? I'd like to avoid having to use a name/value pair in the links in[/color]
      the[color=blue]
      > left frame, which I'm currently doing. I'd prefer to use something similar
      > to $_server('REFER ER') but I can't find anything that would list the
      > referring url rather than the referring page.
      >
      > Thanks.
      >
      >[/color]


      Comment

      • Erwin Moller

        #4
        Re: Determining the referring URL

        Jenkins wrote:
        [color=blue]
        > The left frame loads a php file that selects and displays links from a
        > mysql db. All the links in the left frame call the same page,
        > showapps.php. Showapps.php has to determine which link was clicked and
        > then selects info associated with that link.
        >
        > I'm currently hardcoding a name/value pair, i.e., ?cat=1, ?cat=2, etc,
        > onto each link in the left frame. The showapps.php, which loads into the
        > main frame, selects from a mysql db based on the value in the name/value
        > pair. I'd like to just read the refering url the same way I can read the
        > referring page and then determine which category to select.
        >
        > "Jenkins" <news@djenkins. nu> wrote in message
        > news:AzSkb.8372 50$uu5.147934@s ccrnsc04...[/color]

        Hi Jenkins,

        I still don't see what you mean now. Sorry. :-(

        I think that your approach with the getstatement is just fine to achieve
        what you want to achive.
        It is the most natural way to pass information to a dynamic page (along with
        the POST of course)

        Just use a loop in php in your leftframe over all categories and generate
        the links the links.

        And in your showapps you just use $requestedCat = $_GET["cat"] to get the
        value for your category.

        I don't know what you expect more out of your frames/php.

        And you can always use this to get all environment-variables PHP is aware
        of:

        <?php
        phpinfo();
        ?>

        Good luck,

        Regards,
        Erwin Moller

        Comment

        Working...