How to redirect parent frame?

This is a discussion on How to redirect parent frame? within the alt.comp.lang.php forums, part of the PHP Programming Forums category; I have a main page with a iframe in it, if i send the redirect header (header ('Location: ' . $url);) the ...


Go Back   Usenet Forums > PHP Programming Forums > alt.comp.lang.php

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-06-2005
Du
 
Posts: n/a
Default How to redirect parent frame?

I have a main page with a iframe in it, if i send the redirect header
(header ('Location: ' . $url);) the new page loaded in the the iframe. How
do I redirect with the change apply to the whole page instead of just the
iframe?


Basicly I want to get the php version of javascript line
window.location="http://www.yourdomain.com/";


Thanks


Reply With Quote
  #2 (permalink)  
Old 02-06-2005
Du
 
Posts: n/a
Default Re: How to redirect parent frame?

Got it !!

PHP is a server side script it can't tell where the browse put its stuff.

For those interested, I work around it by place and echo of a javascript
statement.

// this only work for ie i think, netscape and mozilla use diff command
echo '<script> window.top.location="' . $url . '"; </script>';



"Du" <vietquest@hotmail.com> wrote in message
news:NdWdnS-sTsmi0pvfRVn-vg@rogers.com...
>I have a main page with a iframe in it, if i send the redirect header
>(header ('Location: ' . $url);) the new page loaded in the the iframe. How
>do I redirect with the change apply to the whole page instead of just the
>iframe?
>
>
> Basicly I want to get the php version of javascript line
> window.location="http://www.yourdomain.com/";
>
>
> Thanks
>



Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 10:56 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0