Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

frameset anchor

Status
Not open for further replies.

MCasey

Technical User
May 30, 2006
21
US
I have a link where I need to open a new frameset (newframeset), but I also want one of the frames (mainContent) to go to a specific anchor.

I something linking to something like this:

"newframeset.html/mainContent=frameA.html#anchorname"

Does that make any sense?

Any helped appreciated

 
ok, forget about the anchor page

how can I link to a new frameset (newframeset) and tell it to load a certain page (frameA) into the mainContent frame?

I know I've seen this before with something like mainContent=frameA.html

anyone else?
 
Hi

You may add a JavaScript to the document containing the [tt]frameset[/tt] :
Code:
<html>
<script type="text/javascript">
par=location.search.replace(/^\?/,'').split(/[&;]/);
var url=''
for (i=0;i<par.length;i++) if (par[i].substr(0,4).toLowerCase()=='url=') url=par[i].substr(4)
window.onload=function() { two.location=url; }
</script>
<frameset rows="*,*">
<frame name="one" src="[URL unfurl="true"]http://google.com/">[/URL]
<frame name="two" src="">
</frameset>
</html>
And use a URL like



Feherke.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top