views:

210

answers:

1

I have a three step registration process, all on one page, the last of which requires the user to select a saved payment method or input a new one.

Obviously, I want to collect that new data over SSL. Step 2 of the process involves showing the user a Google map, and the GMaps API doesn't play nice with SSL.

My solution is to use a popup with a small "New Payment Method" page served via SSL. The user enters the info, and gives the new payment method a nicjname. When they click the submit button I use an ajax call to save the info to the database before closing the window.

My question is how do I update the parent page with the new method's nickname, so that the user can finish the registration process?

I'm using jQuery, so any solutions using jQuery would be nice.

+1  A: 

You can access the original window with opener using javascript, including calls to any function defined in that window.

For instance:

window.opener.addValue(newValue);

Should do what you want.

krusty.ar