Link not opening in frames on using Back button

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • swapcool
    New Member
    • Feb 2008
    • 3

    Link not opening in frames on using Back button

    Hi,

    I am a page having a menu and a few frames life below.
    The links in menu open in F3 frame. I also have back/forward buttons in F1 frame.
    _______________ _________
    ____________F1_ ________|
    | F2 |.............. ............... ... |
    | .... |.............. ............... ... |
    | M | .............F3 ............... |
    | E | ............... ............... .|
    | N |.............. ............... .. |
    | U |.............. ............... .. |
    _______________ ________

    The menu links open correctly in the F3 frame as expected. The back button works correctly BUT once the BACK button is used, all the link in the menu start opening in new window. They won't open in the frame F3.

    Menu is a Dhtml menu (tagert=F3)
    Back button is a History.back( ) function.

    Does anyone have any clue what could be wrong?

    Thank you,
    Swap
  • Jacotheron
    New Member
    • Jan 2008
    • 44

    #2
    Originally posted by swapcool
    Hi,

    I am a page having a menu and a few frames life below.
    The links in menu open in F3 frame. I also have back/forward buttons in F1 frame.
    _______________ _________
    ____________F1_ ________|
    | F2 |.............. ............... ... |
    | .... |.............. ............... ... |
    | M | .............F3 ............... |
    | E | ............... ............... .|
    | N |.............. ............... .. |
    | U |.............. ............... .. |
    _______________ ________

    The menu links open correctly in the F3 frame as expected. The back button works correctly BUT once the BACK button is used, all the link in the menu start opening in new window. They won't open in the frame F3.

    Menu is a Dhtml menu (tagert=F3)
    Back button is a History.back( ) function.

    Does anyone have any clue what could be wrong?

    Thank you,
    Swap
    The main problem is that a frameset page is open. All pages viewed through the frameset is recorded by the history as a single page. If you use the history.back() function, the browser will try to display the page viewed before the frameset.

    My advice will be to use a static link. You might not be able to go to the page previously viewed if more than one page have a link to the page viewed.

    Glad to be able to help

    Comment

    • acoder
      Recognized Expert MVP
      • Nov 2006
      • 16032

      #3
      Originally posted by Jacotheron
      The main problem is that a frameset page is open. All pages viewed through the frameset is recorded by the history as a single page. If you use the history.back() function, the browser will try to display the page viewed before the frameset.
      That's not quite true. Try it.

      Comment

      • acoder
        Recognized Expert MVP
        • Nov 2006
        • 16032

        #4
        Originally posted by swapcool
        Does anyone have any clue what could be wrong?
        It could be possible that F3 is not defined anymore so it spawns a new window.

        Comment

        • swapcool
          New Member
          • Feb 2008
          • 3

          #5
          _______________ _______________ ______
          ____________F1_ ____|Back | Forward____|
          | F2 |.............. ............... ............... ............... ..... |
          | .... |.............. ............... ............... ............... .......|
          | M | .............F3 ............... ............... ............... ...|
          | E | ............... ............... ............... ............... .....|
          | N |.............. ............... ............... ............... ...... |
          | U |.............. ............... ............... ............... ....... |
          |___|__________ _______________ ________|

          Below are more details about the page....

          Back and Froward are 2 buttons in an html page appearing in frame F1 (F1.htm).
          <input type="button" onClick="parent .F3.history.bac k(); value="Back">

          F3 is the frame targetted in the links in the Menu.

          Below is the main page _______________ _______________ __

          [HTML]<frameset id="TopFrame" rows=67,* >
          <frame src="F1.htm" name="top" scrolling=no>
          <frameset id="LowerFrame " cols=250,* >
          <frame src="Menu.htm" name="F2" >
          <frameset id="RightFrame " cols=20,*,20>
          <frame name="L1" src="L1.htm" scrolling=no>
          <frameset id="Center" rows=16,*,20>
          <frame name="C1" src="Top1.htm" scrolling=no>
          <frame name="F3" id="F3" src="Main.mht">
          <frame name="C2" src="Bottom.htm " scrolling=no>
          </frameset>
          <frame name="R13" src="R1.htm" scrolling=no>
          </frameset>
          </frameset>
          </frameset>
          </html>
          [/HTML]_______________ _______________ _______________ _______________ ____
          Last edited by acoder; Feb 5 '08, 12:02 PM. Reason: Added code tags

          Comment

          • acoder
            Recognized Expert MVP
            • Nov 2006
            • 16032

            #6
            Why do you have so many nested framesets?

            Comment

            • swapcool
              New Member
              • Feb 2008
              • 3

              #7
              I am not very good at html. What I am trying to do is make the page look good for various resolutions. Most of the frames just display images.

              Comment

              • acoder
                Recognized Expert MVP
                • Nov 2006
                • 16032

                #8
                You shouldn't need to nest framesets just for layout, but anyway, here's a link that should prove useful.

                Comment

                Working...