Frames and Browser Reload Question

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • David T. Ashley

    Frames and Browser Reload Question

    Hi,

    I have an application where I use a left frame to navigate to another page
    in the main frame. After I've done this, when I use "RELOAD" in the
    browser, it goes back to the original page rather than the one I've
    navigated to.

    If you go to this page:



    Then choose "Flight Schedule" on the left navigation pane, then use RELOAD
    in the browser, it goes back to the original page.

    How do I change this?

    Thanks, Dave Ashley



  • John Dunlop

    #2
    Re: Frames and Browser Reload Question

    David T. Ashley:
    [color=blue]
    > I have an application where I use a left frame to navigate to another page
    > in the main frame. After I've done this, when I use "RELOAD" in the
    > browser, it goes back to the original page rather than the one I've
    > navigated to.
    >
    > How do I change this?[/color]

    This is a concomitant of frames. Not much you can do, short of
    giving each page in the main frame its own frameset (i.e., every
    combination of left page and main page has a distinct URL).

    If 'RELOAD' reloads the current URL and the current URL points to a
    frameset, then it is the frameset that will be reloaded.

    Comp.infosystem s.www.authoring.site-design.

    --
    Jock

    Comment

    • Jiri Fogl

      #3
      Re: Frames and Browser Reload Question

      The best advice is probably not to use frames - there are more problems
      with them (i.e. accessibility - browse through framed page with cell
      phone is a nightmare).

      If you must use them, try using cookies or sessions. Every page in main
      frame saves its name to the session or cookie. Main page (the one with
      <frameset> and <frame> tags) will read this information and write the
      appropriate src attribute of main frame.


      David T. Ashley wrote:[color=blue]
      > Hi,
      >
      > I have an application where I use a left frame to navigate to another page
      > in the main frame. After I've done this, when I use "RELOAD" in the
      > browser, it goes back to the original page rather than the one I've
      > navigated to.
      >
      > If you go to this page:
      >
      > http://fboprimedevel.e3ft.com
      >
      > Then choose "Flight Schedule" on the left navigation pane, then use RELOAD
      > in the browser, it goes back to the original page.
      >
      > How do I change this?
      >
      > Thanks, Dave Ashley
      >
      >
      >[/color]

      Comment

      • David T. Ashley

        #4
        Re: Frames and Browser Reload Question

        "Jiri Fogl" <xfoglj00@stud. fit.vutbr.cz> wrote in message
        news:e1akkt$knc $1@boco.fee.vut br.cz...[color=blue]
        > The best advice is probably not to use frames - there are more problems
        > with them (i.e. accessibility - browse through framed page with cell phone
        > is a nightmare).
        >
        > If you must use them, try using cookies or sessions. Every page in main
        > frame saves its name to the session or cookie. Main page (the one with
        > <frameset> and <frame> tags) will read this information and write the
        > appropriate src attribute of main frame.
        >[/color]

        In a logical sense, I agree with you ... the behavior of the browser is not
        guaranteed and it should reload the frameset.

        The mystery to me is why Internet Explorer is apparently able to make such
        good guesses most of the time.

        For example, if you go to this web site:



        and try the links on the left navigation bar (with Internet Explorer), then
        use reload, you'll notice that it reloads the main frame as expected. I
        know for sure that this site does not use cookies for frame status (I helped
        them set it up). I can cite other sites with frames that behave the same
        way with IE. (For example, http://webtools.e3ft.com/ and try the "htpasswd
        generation" and then reload.)

        So, IE is using cues that I'm not understanding to take a good guess ... but
        it doesn't work on the development site I'm playing with. The question is
        why.

        Thank you for the suggestion about the cookies. That will definitely do the
        trick if I can't figure out why IE works the way it does (and it is probably
        better as it would work on other browsers, too). That suggestion will
        definitely cure my problem. But the mystery remains ...

        Thanks, Dave



        Comment

        • strawberry

          #5
          Re: Frames and Browser Reload Question

          Just a thought, seeing as you're using php anyway, why not just forget
          about frames and use an html table for your index instead, something
          like this...

          echo "<head>\n";
          //get ready to load the selected page
          if (isset($_GET['page']))

          {
          $page = $_GET['page'];
          $suffix = '.php';
          $ps = $page.$suffix;
          }
          else
          {
          $ps = 'home.php';
          }
          $page = ucwords($page);
          echo "<html>\n";
          echo "<head>\n";
          echo "<title>Wel come to My $page Page</title>\n";

          echo "</head>\n";

          Your table might look something like this...

          echo "<tr>\n";
          echo "<td><a href='$PHP_SELF ?page=home'>Hom e</a></td>\n";
          echo "</tr>\n";
          echo "<tr>\n";
          echo "<td><a href='$PHP_SELF ?page=news'>New s</a></td>\n";
          echo "</tr>\n";
          echo "<tr>\n";
          echo "<td><a href='$PHP_SELF ?page=projects' >Projects</a></td>\n";
          echo "</tr>\n";

          and a table within one of these pages (in this case the Projects page)
          might look something like this...

          echo "<th><a title='Sort by this column'
          href='$PHP_SELF ?key=project_no '>Project No</a></th>\n";

          HTH

          Comment

          • Jerry Stuckle

            #6
            Re: Frames and Browser Reload Question

            strawberry wrote:[color=blue]
            > Just a thought, seeing as you're using php anyway, why not just forget
            > about frames and use an html table for your index instead, something
            > like this...
            >
            > echo "<head>\n";
            > //get ready to load the selected page
            > if (isset($_GET['page']))
            >
            > {
            > $page = $_GET['page'];
            > $suffix = '.php';
            > $ps = $page.$suffix;
            > }
            > else
            > {
            > $ps = 'home.php';
            > }
            > $page = ucwords($page);
            > echo "<html>\n";
            > echo "<head>\n";
            > echo "<title>Wel come to My $page Page</title>\n";
            >
            > echo "</head>\n";
            >
            > Your table might look something like this...
            >
            > echo "<tr>\n";
            > echo "<td><a href='$PHP_SELF ?page=home'>Hom e</a></td>\n";
            > echo "</tr>\n";
            > echo "<tr>\n";
            > echo "<td><a href='$PHP_SELF ?page=news'>New s</a></td>\n";
            > echo "</tr>\n";
            > echo "<tr>\n";
            > echo "<td><a href='$PHP_SELF ?page=projects' >Projects</a></td>\n";
            > echo "</tr>\n";
            >
            > and a table within one of these pages (in this case the Projects page)
            > might look something like this...
            >
            > echo "<th><a title='Sort by this column'
            > href='$PHP_SELF ?key=project_no '>Project No</a></th>\n";
            >
            > HTH
            >[/color]

            Or even better than tables, use CSS.

            --
            =============== ===
            Remove the "x" from my email address
            Jerry Stuckle
            JDS Computer Training Corp.
            jstucklex@attgl obal.net
            =============== ===

            Comment

            Working...