PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Moderator: General Moderators
AliasBDI
Forum Contributor
Posts: 286 Joined: Fri Nov 15, 2002 10:35 am
Location: Spring, TX, USA
Post
by AliasBDI » Fri Nov 07, 2003 11:44 am
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?
Leash
Forum Newbie
Posts: 5 Joined: Thu Nov 06, 2003 7:34 am
Location: Sweden
Post
by Leash » Fri Nov 07, 2003 4:48 pm
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!
twigletmac
Her Royal Site Adminness
Posts: 5371 Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK
Post
by twigletmac » Sat Nov 08, 2003 3:06 pm
Not sure what this has to do with Databases so I've moved it to the PHP - Code forum.
Mac
d3ad1ysp0rk
Forum Donator
Posts: 1661 Joined: Mon Oct 20, 2003 8:31 pm
Location: Maine, USA
Post
by d3ad1ysp0rk » Sat Nov 08, 2003 3:08 pm
meta refresh?
AliasBDI
Forum Contributor
Posts: 286 Joined: Fri Nov 15, 2002 10:35 am
Location: Spring, TX, USA
Post
by AliasBDI » Wed Nov 12, 2003 7:58 am
MetaRefresh won't work.
And I don't know anything about javaScript.
Anymore ideas... Surely this can be done in PHP.
hedge
Forum Contributor
Posts: 234 Joined: Fri Aug 30, 2002 10:19 am
Location: Calgary, AB, Canada
Post
by hedge » Wed Nov 12, 2003 8:44 am
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.