Refreshing a whole browser page, from within iframe

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
simonmlewis
DevNet Master
Posts: 4435
Joined: Wed Oct 08, 2008 3:39 pm
Location: United Kingdom
Contact:

Refreshing a whole browser page, from within iframe

Post 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>
Love PHP. Love CSS. Love learning new tricks too.
All the best from the United Kingdom.
simonmlewis
DevNet Master
Posts: 4435
Joined: Wed Oct 08, 2008 3:39 pm
Location: United Kingdom
Contact:

Re: Refreshing a whole browser page, from within iframe

Post by simonmlewis »

Bingo

Code: Select all

<script type=\"text/javascript\"><!--
setTimeout('Redirect()',4000);
function Redirect()
{
  parent.location.href = 'chatend.php';
}
// --></script>
parent....
:)
Love PHP. Love CSS. Love learning new tricks too.
All the best from the United Kingdom.
Post Reply