Page 1 of 1

Refreshing a whole browser page, from within iframe

Posted: Thu Jul 14, 2011 10:41 am
by simonmlewis
I have posted this elsewhere on this forum, but this particular part is more toward javascript.

I can see what this does, but can it be adjusted to use the html's target='_parent' style? So it reload the entire page, rather than just the page inside the iframe?

Code: Select all

<script type="text/javascript"><!--
setTimeout('Redirect()',4000);
function Redirect()
{
  location.href = '../htmljavascript.htm';
}
// --></script>

Re: Refreshing a whole browser page, from within iframe

Posted: Thu Jul 14, 2011 11:10 am
by simonmlewis
Bingo

Code: Select all

<script type=\"text/javascript\"><!--
setTimeout('Redirect()',4000);
function Redirect()
{
  parent.location.href = 'chatend.php';
}
// --></script>
parent....
:)