Forum Moderators: open
<frameset rows="91,*" cols="*" framespacing="0" frameborder="NO" border="0">
<frame src="../top_frame.php" name="topFrame" scrolling="auto" >
<?
$searchFor = $_GET["searchFor"];
print <<<END
<frame src="http://www.someothersite/search.php?term=$searchFor" name="mainFrame">
END;
?>
</frameset>
<noframes><body>
</body></noframes>
The topFrame is from my site, and the mainFrame is someone elses site. If someone goes to this site they might go through several links in the main frame and then decide to close the top frame. Therefore I would not know the URL of the main frame. Am I confused about this? If so, what do I put in the following javascript code:
<a href="javascript:top.location.href=otherframe.location.href">Close me</a>
javascript:top.location.href=parent.mainFrame.location.href
Shouldn't this be replaced with the link to the mainFrame? Is there a page out there that I can see how it works?
<FRAMESET cols="100%,*" border=0 frameborder=0 framespacing=0>
<FRAME name="left" src="http://YOUR OUTSIDE DOMAIN HERE" frameborder=0 marginheight=0 marginwidth=0></FRAME>
<FRAME name="right" frameborder=0 marginheight=0 marginwidth=0></FRAME>
</FRAMESET>
When using the
javascript:top.location.href= .......
type of coding, what word would I use in this if I wanted the page I was loading to LOAD INTO A BLANK or NEW window?
I have tried using
javascript:new.location.href= ......
AND
javascript:blank.location.href= .....
But those do not work.
<?
$searchFor = $_GET["searchFor"];
?>
<a href="http://www.someothersite/search.php?term=<? print $searchfor;?>" target="_parent">close me</a>
This will open the same page in your parent frame, which should be the whole window. This will make it look like the top frame was "closed".