Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Refreshing the parent window

Status
Not open for further replies.

timfoster

Programmer
Joined
Dec 19, 2002
Messages
110
Location
GB
Hi guys,

I need to load a new page into my main site from a pop up window.

The scenario is this:
When a punter clicks the purchase button, the payment page opens in a new window. Before the payment page opens another page is loaded to set some db stuff up. This then redirects to the payment page where the punter obviously enter their payment details. This page submits to the credit card processing page when also does some db stuff. When the card has been checked I'll get either a success or fail from the cc processor. I want to close the popup window and, depending on whether I get a successful payment or not, I want to redirect the main site window to either a thanks or not page.

I've tried using parent.location = 'success.asp' but this seems to be setting the popup because the page by this time has been set from within the popup (I'm assuming that because this is the case the opener of the current page is the previous page in the popup window)

Can anyone help me?
 
try using window.opener instead of parent.

Tracy Dryden

Meddle not in the affairs of dragons,
For you are crunchy, and good with mustard. [dragon]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top