Framesets

liunx

Guest
Hi All,<br />
<br />
I have asked this question before but I am still having problems,<br />
<br />
<br />
I have a FRAMESET with 2 FRAMES, TOP & BOTTOM.<br />
<br />
There is a link in FRAMESET1 that calls an external site.<br />
<br />
I want the external site to be loaded into FRAMESET2 Bottom FRAME.<br />
<br />
FRAMESET1<br />
<br />
<html><br />
<head><br />
<title>Untitled Document</title><br />
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><br />
</head><br />
<br />
<body bgcolor="#FFFFFF" text="#000000"><br />
<br />
<a href=http://www.webdeveloper.com/forum/archive/index.php/"http://www.testsite.com">Link</a><br />
<br />
</body><br />
</html><br />
<br />
FRAMESET2<br />
<br />
<html><br />
<head><br />
<title>Travelling to England : External Link</title><br />
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><br />
</head><br />
<frameset rows="80,*" frameborder="NO" border="0" framespacing="0"> <br />
<frame name="topFrame" scrolling="NO" noresize src=http://www.webdeveloper.com/forum/archive/index.php/"ExternalTopFrame.htm" ><br />
<frame name="mainFrame" src=http://www.webdeveloper.com/forum/archive/index.php/"ExternalMFrame.htm" scrolling "no" noresize marginheight="0" marginwidth="0"><br />
<frame src=http://www.webdeveloper.com/forum/archive/index.php/"http://www.testsite.com" name="mainframe" marginheight="0" marginwidth="0"><br />
</frameset><br />
<noframes> <br />
<body bgcolor="#FFFFFF" text="#000000"><br />
</body><br />
</noframes> <br />
</html><br />
<br />
<br />
Is this possible<br />
<br />
<br />
Your help is required,<br />
<br />
Regards<br />
<br />
<br />
Dereck<!--content-->This should do it. <br />
<br />
<a href=http://www.webdeveloper.com/forum/archive/index.php/"http://www.testsite.com" target="mainFrame">Link</a><!--content-->Hi and Thanks for your reply.<br />
<br />
If I use <br />
<br />
<a href=http://www.webdeveloper.com/forum/archive/index.php/"http://www.testsite.com" target="mainFrame">Link</a><br />
<br />
that will load the page into the "mainframe" in the current FRAMESET1. I want to load it into the FRAMESET2.<br />
<br />
Does that make sence<br />
<br />
<br />
Regards<br />
<br />
<br />
Dereck<!--content-->Well, just change the target to the name of the frame that you want to load it into. You don't have a frame named FRAMESET 2, so you will have to just check which frame you want to load it into, and change the target to the frame name.<!--content-->Hi again<br />
<br />
I see what you are saying but I may not have explained what I am trying to do correctly.<br />
<br />
When I execute a link from within FRAMESET1 I want the link to appear in a page which I can have mysites info in the TOP FRAME and the links contents inthe BOTTOM FRAME.<br />
<br />
An example a what I am trying to do is <br />
<br />
goto <!-- m --><a class="postlink" href="http://www.visitbritain.com/uk/learn_english/learn.htm">http://www.visitbritain.com/uk/learn_english/learn.htm</a><!-- m --><br />
<br />
click <br />
<!-- w --><a class="postlink" href="http://www.britishcouncil.org">www.britishcouncil.org</a><!-- w --> <br />
<br />
and you will see my desired result <br />
<br />
I do hope you can help with this one<br />
<br />
regards Dereck<!--content-->Do you use any server side languages?<!--content-->It's easy with s-side-languages, but if you don't use them try it this way:<br />
<br />
in your frameset1 the link and the function should be:<br />
<br />
<script language="JavaScript"><br />
function framing(url,framepage)<br />
{<br />
w = window.open(framepage,'gg','width=300,height=300')<br />
w.frames["bottomFrame"].window.location.href= <!-- m --><a class="postlink" href="http://www.webdeveloper.com/forum/archive/index.php/url;">http://www.webdeveloper.com/forum/archi ... x.php/url;</a><!-- m --><br />
}<br />
</script><br />
<a href=http://www.webdeveloper.com/forum/archive/index.php/"http://www.testsite.com" onClick="framing(this.href,'frameset.html');return false">Go</a> <br />
<br />
and in your frameset2 your bottom frame should be named what 'w.frames["bottomFrame"]' is how.<!--content-->Hi Swan,<br />
<br />
Thanks fo ryour reply, this does help.<br />
<br />
Yes I do use server side scripting, PHP. Can it be done using PHP.<br />
<br />
What I want to happen is to pass the URL from FRAMSET1,<br />
<br />
to FRAMESET2, remembering that FRAMESET2 is is a FRAME in FREAMESET1. But how?<br />
<br />
<br />
Many thanks<br />
<br />
<br />
Dereck<!--content-->For example:<br />
<br />
that's frameset 1:<br />
<br />
<frameset rows="200,*" border=0><br />
<frame src=http://www.webdeveloper.com/forum/archive/index.php/"top.php" name="TopFrame" scrolling=auto noresize><br />
<frame src=http://www.webdeveloper.com/forum/archive/index.php/"frameset2.php" name="bottomFrame" scrolling=auto noresize><br />
</frameset><br />
<br />
that's frameset2:<br />
<br />
<?<br />
if(!$site)<br />
{$site="http://www.blue.com";}<br />
?><br />
<frameset rows="80,100,*" frameborder="NO" border="0" framespacing="0"><br />
<frame name="topFrame" scrolling="NO" noresize src=http://www.webdeveloper.com/forum/archive/index.php/"ExternalTopFrame.htm"><br />
<frame name="mainFrame" src=http://www.webdeveloper.com/forum/archive/index.php/"ExternalMFrame.htm" scrolling "no" noresize marginheight="0" marginwidth="0"><br />
<frame src=http://www.webdeveloper.com/forum/archive/index.php/"<?=$site;?>" name="bottom" marginheight="0" marginwidth="0"><br />
</frameset><br />
<br />
and the link should be:<br />
<br />
<a href=http://www.webdeveloper.com/forum/archive/index.php/"frameset2.php?site=http://www.google.com" target="bottomFrame">Go</a><br />
<br />
remember that bottomFrame is frameset1 bottom.<br />
in the link you can change site=towhateveryouwant and it will be loaded in your frameset2 --> bottomFrame<br />
<br />
if some questions, let me know!<!--content-->Sorry for b&tting in - make sure that the external site you are linking to (unless it is one of your own) will not become a rights issue. For example, if you will load some private company's site in the BOTTOM frame, under your logo in the TOP frame, you may be in the world of hurting, if someone from that company will raise a copyright issue, etc.<!--content-->
 
Back
Top