Click to See Complete Forum and Search --> : Framesets


dcjones
01-09-2003, 01:46 PM
Hi All,

I have asked this question before but I am still having problems,


I have a FRAMESET with 2 FRAMES, TOP & BOTTOM.

There is a link in FRAMESET1 that calls an external site.

I want the external site to be loaded into FRAMESET2 Bottom FRAME.

FRAMESET1

<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body bgcolor="#FFFFFF" text="#000000">

<a href="http://www.testsite.com">Link</a>

</body>
</html>

FRAMESET2

<html>
<head>
<title>Travelling to England : External Link</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<frameset rows="80,*" frameborder="NO" border="0" framespacing="0">
<frame name="topFrame" scrolling="NO" noresize src="ExternalTopFrame.htm" >
<frame name="mainFrame" src="ExternalMFrame.htm" scrolling "no" noresize marginheight="0" marginwidth="0">
<frame src="http://www.testsite.com" name="mainframe" marginheight="0" marginwidth="0">
</frameset>
<noframes>
<body bgcolor="#FFFFFF" text="#000000">
</body>
</noframes>
</html>


Is this possible


Your help is required,

Regards


Dereck

pyro
01-09-2003, 02:05 PM
This should do it.

<a href="http://www.testsite.com" target="mainFrame">Link</a>

dcjones
01-09-2003, 02:16 PM
Hi and Thanks for your reply.

If I use

<a href="http://www.testsite.com" target="mainFrame">Link</a>

that will load the page into the "mainframe" in the current FRAMESET1. I want to load it into the FRAMESET2.

Does that make sence


Regards


Dereck

pyro
01-09-2003, 02:25 PM
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.

dcjones
01-09-2003, 03:05 PM
Hi again

I see what you are saying but I may not have explained what I am trying to do correctly.

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.

An example a what I am trying to do is

goto http://www.visitbritain.com/uk/learn_english/learn.htm

click
www.britishcouncil.org

and you will see my desired result

I do hope you can help with this one

regards Dereck

swon
01-09-2003, 07:33 PM
Do you use any server side languages?

swon
01-09-2003, 08:06 PM
It's easy with s-side-languages, but if you don't use them try it this way:

in your frameset1 the link and the function should be:

<script language="JavaScript">
function framing(url,framepage)
{
w = window.open(framepage,'gg','width=300,height=300')
w.frames["bottomFrame"].window.location.href= url;
}
</script>
<a href="http://www.testsite.com" onClick="framing(this.href,'frameset.html');return false">Go</a>

and in your frameset2 your bottom frame should be named what 'w.frames["bottomFrame"]' is how.

dcjones
01-10-2003, 03:54 AM
Hi Swan,

Thanks fo ryour reply, this does help.

Yes I do use server side scripting, PHP. Can it be done using PHP.

What I want to happen is to pass the URL from FRAMSET1,

to FRAMESET2, remembering that FRAMESET2 is is a FRAME in FREAMESET1. But how?


Many thanks


Dereck

swon
01-10-2003, 01:17 PM
For example:

that's frameset 1:

<frameset rows="200,*" border=0>
<frame src="top.php" name="TopFrame" scrolling=auto noresize>
<frame src="frameset2.php" name="bottomFrame" scrolling=auto noresize>
</frameset>

that's frameset2:

<?
if(!$site)
{$site="http://www.blue.com";}
?>
<frameset rows="80,100,*" frameborder="NO" border="0" framespacing="0">
<frame name="topFrame" scrolling="NO" noresize src="ExternalTopFrame.htm">
<frame name="mainFrame" src="ExternalMFrame.htm" scrolling "no" noresize marginheight="0" marginwidth="0">
<frame src="<?=$site;?>" name="bottom" marginheight="0" marginwidth="0">
</frameset>

and the link should be:

<a href="frameset2.php?site=http://www.google.com" target="bottomFrame">Go</a>

remember that bottomFrame is frameset1 bottom.
in the link you can change site=towhateveryouwant and it will be loaded in your frameset2 --> bottomFrame

if some questions, let me know!

Daria
01-12-2003, 06:18 PM
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.