frames and back action

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

    frames and back action

    Hello, I have a page defined like this:

    <html>
    <frameset>
    <frame src="./topone.pl">
    <frameset>
    <frame src="./frame1.pl">
    <frame src="./frame2.pl">
    </frameset>
    </frameset>
    </html>

    Then I click in one link in the first page and the mainpage, frame1
    and frame2 change the page show.
    The problem is that when pressing the "back" action, just the frame2
    change, than I need to press other two times the "back" to arrive in
    the original page/frames.

    Does exist a back action (-3)? I tried the code:
    window.onback = history.back(-3);
    without success (FF e IE7)

    Any help will be appreciate
    Thanks in advance
  • Erwin Moller

    #2
    Re: frames and back action

    Flyzone schreef:
    Hello, I have a page defined like this:
    >
    <html>
    <frameset>
    <frame src="./topone.pl">
    <frameset>
    <frame src="./frame1.pl">
    <frame src="./frame2.pl">
    </frameset>
    </frameset>
    </html>
    >
    Then I click in one link in the first page and the mainpage, frame1
    and frame2 change the page show.
    The problem is that when pressing the "back" action, just the frame2
    change, than I need to press other two times the "back" to arrive in
    the original page/frames.
    Hi,

    Yes, that is because the browser thinks you want to go back if you hit
    the BACK button.
    What if you actually wanted to go back only from your last click in some
    frame, and the browser decides to go back in all frames? What is some of
    those frames don't have a history to go back to?

    What you see is normal and desired behaviour.
    >
    Does exist a back action (-3)? I tried the code:
    window.onback = history.back(-3);
    without success (FF e IE7)
    >
    Any help will be appreciate
    Thanks in advance
    If you MUST sync your frames somehow, you'll have to build that
    explicity in JavaScript. But of course your pages will fail when a user
    has it disabled.
    That is about 10% of the websurfers I think.
    Warning: Thomas Pointedears once told me that 138% of the statistics you
    find on the web are flawed. ;-)

    Solution?
    Don't use frames and avoid this whole mess. Or make a working syncing
    mechanism in JavaScript.

    Regards,
    Erwin Moller


    --
    "There are two ways of constructing a software design: One way is to
    make it so simple that there are obviously no deficiencies, and the
    other way is to make it so complicated that there are no obvious
    deficiencies. The first method is far more difficult."
    -- C.A.R. Hoare

    Comment

    • Flyzone

      #3
      Re: frames and back action

      On 18 Nov, 19:15, Erwin Moller
      <Since_humans_r ead_this_I_am_s pammed_too_m... @spamyourself.c omwrote:
      Warning: Thomas Pointedears once told me that 138% of the statistics you
      find on the web are flawed. ;-)
      Will be used by 3 users in a intranet...no problem for that :P
      Don't use frames and avoid this whole mess. Or make a working syncing
      mechanism in JavaScript.
      I cannot avoid frames (many reasons for this), but I however have the
      problem with the back action...
      From msdn website seems not exist and if I try to use it in a
      webpage,
      the action is made when loading the page.
      So..how to intercept the back button of the browser?

      Thanks...

      Comment

      • Erwin Moller

        #4
        Re: frames and back action

        Flyzone schreef:
        On 18 Nov, 19:15, Erwin Moller
        <Since_humans_r ead_this_I_am_s pammed_too_m... @spamyourself.c omwrote:
        >Warning: Thomas Pointedears once told me that 138% of the statistics you
        >find on the web are flawed. ;-)
        >
        Will be used by 3 users in a intranet...no problem for that :P
        >
        >Don't use frames and avoid this whole mess. Or make a working syncing
        >mechanism in JavaScript.
        >
        I cannot avoid frames (many reasons for this), but I however have the
        problem with the back action...
        From msdn website seems not exist and if I try to use it in a
        webpage,
        the action is made when loading the page.
        So..how to intercept the back button of the browser?
        Hi,

        I cannot follow everything you wrote, but I can maybe help with the last
        question: "So..how to intercept the back button of the browser?"

        Have a look at the unload event handler, eg:
        <body onUnLoad="alert ('bye');">

        Maybe you can do the syncing in there?

        Regards,
        Erwin Moller
        >
        Thanks...

        --
        "There are two ways of constructing a software design: One way is to
        make it so simple that there are obviously no deficiencies, and the
        other way is to make it so complicated that there are no obvious
        deficiencies. The first method is far more difficult."
        -- C.A.R. Hoare

        Comment

        • Thomas 'PointedEars' Lahn

          #5
          Re: frames and back action

          Flyzone wrote:
          On 18 Nov, 19:15, Erwin Moller [...] wrote:
          >Warning: Thomas Pointedears once told me that 138% of the statistics you
          >find on the web are flawed. ;-)
          >
          Will be used by 3 users in a intranet...no problem for that :P
          An intranet does not exist in a vacuum either.


          HTH

          PointedEars
          --
          realism: HTML 4.01 Strict
          evangelism: XHTML 1.0 Strict
          madness: XHTML 1.1 as application/xhtml+xml
          -- Bjoern Hoehrmann

          Comment

          • Flyzone

            #6
            Re: frames and back action

            On 19 Nov, 15:13, Erwin Moller
            <Since_humans_r ead_this_I_am_s pammed_too_m... @spamyourself.c omwrote:
            Have a look at the unload event handler, eg:
            <body onUnLoad="alert ('bye');">
            >
            Maybe you can do the syncing in there?
            Just a little problem....the first frame is reloaded itself
            every 5 seconds....the onUnload is activated also on this...
            I made a little more investigation and the onback action
            doesn't exist (in msdn library)...

            I could solve putting a back-button in the first frame with:
            onClick=\"top.h istory.go(-3);

            But I would like to intercept the back button of the browser
            (for the backspace I don't have this problem).

            Well..maybe I have missed somethings in the pre-project
            thinking to use the frames :P

            Comment

            • Erwin Moller

              #7
              Re: frames and back action

              Flyzone schreef:
              On 19 Nov, 15:13, Erwin Moller
              <Since_humans_r ead_this_I_am_s pammed_too_m... @spamyourself.c omwrote:
              >Have a look at the unload event handler, eg:
              ><body onUnLoad="alert ('bye');">
              >>
              >Maybe you can do the syncing in there?
              >
              Just a little problem....the first frame is reloaded itself
              every 5 seconds....the onUnload is activated also on this...
              I made a little more investigation and the onback action
              doesn't exist (in msdn library)...
              >
              I could solve putting a back-button in the first frame with:
              onClick=\"top.h istory.go(-3);
              >
              But I would like to intercept the back button of the browser
              (for the backspace I don't have this problem).
              >
              Well..maybe I have missed somethings in the pre-project
              thinking to use the frames :P
              Hi,

              Well, in all honesty, I don't think anybody in here can help you since
              we don't know the requirements of your webapplication. SO we cannot help
              you with the syncing of the contents in the frames.

              Personally I am also inclined to advise you to make a better design. (Or
              your bosses). Syncing frames sounds to me like bad design.
              There are probably better, more robust, ways to solve the problem at hand.

              Regards,
              Erwin Moller

              --
              "There are two ways of constructing a software design: One way is to
              make it so simple that there are obviously no deficiencies, and the
              other way is to make it so complicated that there are no obvious
              deficiencies. The first method is far more difficult."
              -- C.A.R. Hoare

              Comment

              • David Mark

                #8
                Re: frames and back action

                On Nov 20, 2:41 am, Flyzone <flyz...@techno logist.comwrote :
                On 19 Nov, 15:13, Erwin Moller
                >
                <Since_humans_r ead_this_I_am_s pammed_too_m... @spamyourself.c omwrote:
                Have a look at the unload event handler, eg:
                <body onUnLoad="alert ('bye');">
                >
                Maybe you can do the syncing in there?
                >
                Just a little problem....the first frame is reloaded itself
                every 5 seconds....the onUnload is activated also on this...
                I made a little more investigation and the onback action
                doesn't exist (in msdn library)...
                >
                I could solve putting a back-button in the first frame with:
                onClick=\"top.h istory.go(-3);
                >
                But I would like to intercept the back button of the browser
                (for the backspace I don't have this problem).
                >
                Well..maybe I have missed somethings in the pre-project
                thinking to use the frames :P
                Yes, like the last ten years or so.

                Comment

                Working...