Jump to content

Returning form (post) data to top window from pop-up


hopeless_reckless

Recommended Posts

Everyone,

 

This is probably a really basic question but I have a pop-up window that is supposed to send data back to the parent window. The problem is that once people enter data in the pop-up window, the parent or top window is not refreshed.

 

How do I make the parent window back as the primary recipient of the data. If I put the original page in the <form action parameter, everything happens in the pop-up window. I know I need to put top.window before the original page name but that doesn't seem to work.

 

Is there another way to stipulate the original parent window in the form action or onSubmit() event? I am coding in PHP so that is preferable to JS. Thanks!

To my knowledge, refreshing the parent window upon submitting a form through a child window cannot be achieved using only PHP .. a Javascript function will have to be created to achieve this effect.  for the JS code, you'll have to look in the 'Javascript Help' forum.

 

you probably won't be able to pass the POST data along from one window to the next when having the parent window automatically refresh upon submit, since it's not actually being submitted to that page .. it's just the JS refreshing the window.

 

an alternative would be to have this form data inserted into a tmp database table upon submitting the form on the child (popup) window, and when the parent window is refreshed, your data is then extracted from the DB.

 

all depends on what you are trying to achieve.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.