By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,635 Members | 2,187 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,635 IT Pros & Developers. It's quick & easy.

Link not opening in frames on using Back button

P: 3
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
Feb 1 '08 #1
Share this Question
Share on Google+
7 Replies


Jacotheron
P: 44
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
Feb 2 '08 #2

acoder
Expert Mod 15k+
P: 16,027
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.
Feb 4 '08 #3

acoder
Expert Mod 15k+
P: 16,027
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.
Feb 4 '08 #4

P: 3
____________________________________
____________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.back(); 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]__________________________________________________ ______________
Feb 5 '08 #5

acoder
Expert Mod 15k+
P: 16,027
Why do you have so many nested framesets?
Feb 5 '08 #6

P: 3
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.
Feb 5 '08 #7

acoder
Expert Mod 15k+
P: 16,027
You shouldn't need to nest framesets just for layout, but anyway, here's a link that should prove useful.
Feb 5 '08 #8

Post your reply

Sign in to post your reply or Sign up for a free account.