Page 1 of 1
Redirect inside a Frame
Posted: Fri Nov 07, 2003 11:44 am
by AliasBDI
I have this code
header('Location: index.php')
which redirects putting the "index.php" page in the "_parent" window. I need it to go in the "content" frame. How would that work?
Posted: Fri Nov 07, 2003 4:48 pm
by Leash
Hi,
I don't think this can be solved by using only php.
I usually use some javascript to solve it. Something like this:
if($doreload){
?>
<script language="JavaScript">
parent.frames['frmTop'].location.reload();
</script>
<?
}
?>
Hope it helps!
Cheers!
Posted: Sat Nov 08, 2003 3:06 pm
by twigletmac
Not sure what this has to do with Databases so I've moved it to the PHP - Code forum.
Mac
Posted: Sat Nov 08, 2003 3:08 pm
by d3ad1ysp0rk
meta refresh?
Any more ideas??
Posted: Wed Nov 12, 2003 7:58 am
by AliasBDI
MetaRefresh won't work.
And I don't know anything about javaScript.
Anymore ideas... Surely this can be done in PHP.
Posted: Wed Nov 12, 2003 8:44 am
by hedge
No it can't, it's not a php issue. The RFC does not supply a header to target the frame.
Is this action initiated by a link, if so just put the target of _parent on that link. Otherways either a meta-refresh or javascript is the only way.