To register for an Internet.com membership to receive newsletters and white papers, use the Register button ABOVE.
To participate in the message forums BELOW, click here
PHPBuilder.com  
 

 

Go Back   PHPBuilder.com > Misc Help > ClientSide Technologies

ClientSide Technologies Discuss HTML/CSS/Javascript, and any other client-side technologies, here.

Reply
 
Thread Tools Rate Thread Display Modes
Old 02-24-2006, 05:29 AM   #1
Operandi
Member
 
Join Date: Aug 2002
Posts: 42
PHP Redirection from an iframe

I am using an iframe to deliver a form to a number of customer web sites. Each site needs its own thank you page outside the iframe however I'm struggling to redirect the user to these pages outside the iframe.

I've tried writing a javascript window.parent.location command to the browser from the PHP script, but I think timing issues mean that the browser doesn't always obey this.

Using header ( "location : http://www.theirsite.com/thank_you.php" ); loads the page in the iframe rather than outside the iframe.

Any ideas how to solve this would be gratefully received.

Thanks
Chris
Operandi is offline   Reply With Quote
Old 02-24-2006, 07:02 AM   #2
MarkR
Senior Member
 
Join Date: Jul 2004
Location: Oxford, England
Posts: 1,983
Are the frames coming from different domains? If so, then you will find that the browser forbids cross-domain scripting - therefore you won't be able to script the other frames.

You can still submit a form with a target of _top I think.

Mark
MarkR is offline   Reply With Quote
Old 02-24-2006, 10:26 AM   #3
steelwidow
Junior Member
 
Join Date: Feb 2006
Posts: 3
try target_blank
steelwidow is offline   Reply With Quote
Old 02-27-2006, 04:49 AM   #4
Operandi
Member
 
Join Date: Aug 2002
Posts: 42
Quote:
Are the frames coming from different domains? If so, then you will find that the browser forbids cross-domain scripting - therefore you won't be able to script the other frames.
The iframe is hosted on my server and displayed on my customer's domains, so I want the header ( "location") command to then load the thank you page on their domain. It currently loads it in the iframe and not extenal to the iframe.

Unfortunatley neither target=_blank or target=_top seems to work with the header command, but thanks for the suggestions.
Operandi is offline   Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -4. The time now is 08:53 PM.






Acceptable Use Policy

internet.comMediabistrojusttechjobs.comGraphics.com

WebMediaBrands Corporate Info


Advertise | Newsletters | Feedback | Submit News

Legal Notices | Licensing | Permissions | Privacy Policy


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.