Hi. I want to make a link in a header frame of a two-frame frameset that loads a new two-frame frameset, but also goes to an anchor within the new main frame.
So the link would load the new page with a header and the main frame, but display the part of the main frame where the anchor is.
At present, I can load the new page, <a href="feedback.htm"> where feedback.htm is a two page frameset, consisting of topfeed.htm and mainfeed.htm,
but I suspect that javascript is the only way to also go to an anchor in the mainfeed.htm frame.
Of course, <a href="feedback.htm#feedback">won't find the anchor in mainfeed.htm.
The only way I have found that this type of thing will work is by using a little bit of Javascript... (this thing just about killed me two years ago when I racked my brain in figureing it all out)... The reason why it will not work from a standard link is because a standard link is erased once the browser loads the frameset index, in this case bobsframeset.htm... bobsframeset does not hold the anchor, instead bobsframeset holds the pages that will appear within the frameset, bobsbottom (this one is where the anchor resides) and bobstop... So what you have to do is use javascript to create the frameset page and plug in the link information (target page and target anchor) after the frameset loads...
Basically your link would look like:
Code:
Test this <A HREF="bobsframeset2.htm?newLink=bobsbottom.htm&newAnchor=two">two</A>
and your bobsframeset2.htm page would look like such:
So what you are doing is using javascript to build the frameset and use the search string to fill in the link/anchor information as the frameset is built so that the referenced page opens to that anchor...
HTH,
-sage-
__________________ HTML & CSS Forum Moderator
"If you don't know what you think you know, then what do you know." R.I.P. Derrick Thomas #58 1/1/1967 - 2/8/2000
This is the only problem with your solution. What if someone comes to this frame but not from the link, then they would be directed to the anchor and not the top of file...
-sage-
__________________ HTML & CSS Forum Moderator
"If you don't know what you think you know, then what do you know." R.I.P. Derrick Thomas #58 1/1/1967 - 2/8/2000
The only way I have found that this type of thing will work is by using a little bit of Javascript... (this thing just about killed me two years ago when I racked my brain in figureing it all out)... The reason why it will not work from a standard link is because a standard link is erased once the browser loads the frameset index, in this case bobsframeset.htm... bobsframeset does not hold the anchor, instead bobsframeset holds the pages that will appear within the frameset, bobsbottom (this one is where the anchor resides) and bobstop... So what you have to do is use javascript to create the frameset page and plug in the link information (target page and target anchor) after the frameset loads...
Basically your link would look like:
Code:
Test this <A HREF="bobsframeset2.htm?newLink=bobsbottom.htm&newAnchor=two">two</A>
and your bobsframeset2.htm page would look like such:
So what you are doing is using javascript to build the frameset and use the search string to fill in the link/anchor information as the frameset is built so that the referenced page opens to that anchor...
The only way I have found that this type of thing will work is by using a little bit of Javascript... (this thing just about killed me two years ago when I racked my brain in figureing it all out)... The reason why it will not work from a standard link is because a standard link is erased once the browser loads the frameset index, in this case bobsframeset.htm... bobsframeset does not hold the anchor, instead bobsframeset holds the pages that will appear within the frameset, bobsbottom (this one is where the anchor resides) and bobstop... So what you have to do is use javascript to create the frameset page and plug in the link information (target page and target anchor) after the frameset loads...
Basically your link would look like:
Code:
Test this <A HREF="bobsframeset2.htm?newLink=bobsbottom.htm&newAnchor=two">two</A>
and your bobsframeset2.htm page would look like such:
So what you are doing is using javascript to build the frameset and use the search string to fill in the link/anchor information as the frameset is built so that the referenced page opens to that anchor...