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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

meta tag and frame target question

Status
Not open for further replies.

awingnut

Programmer
Feb 24, 2003
759
US
I have a page in a frameset that uses <meta http-equiv=&quot;refresh&quot; content=&quot;0;newpage.mydomain.com&quot;> to redirect to a new page. How do I include the parameter &quot;target=&quot;_top&quot;&quot; in the refresh so the new page is not in any frame? TIA.
 
I don't think you can with meta refresh. But using the bit of javascript below in the actual page you redirect to will destroy the frameset for you

<html><head>
<title></title>
<script type=&quot;text/javascript&quot;>
<!--
if(parent.frames[1])
parent.location.href=self.location.href;
//-->
</script>
</head>

Regards
Ian

Infinity exists! - I just haven't worked out a way to get there yet.

| |
 
Thanks for the reply but I must be doing something wrong. It didn't help. Is there a way to make sure the script is executing?

Was I supposed to substitute any of my own page names somewhere in the script?
 
I finally got this solved using a suggestion from another source. I don't know why the above suggestion didn't work but the following does:
Code:
<script type=&quot;text/javascript&quot;> 
   <!-- 
   if (top != self) { top.location = self.location; } 
   //--> 
</script>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top