hopeless_reckless Posted August 17, 2008 Share Posted August 17, 2008 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! Link to comment https://forums.phpfreaks.com/topic/120075-returning-form-post-data-to-top-window-from-pop-up/ Share on other sites More sharing options...
mrMarcus Posted August 17, 2008 Share Posted August 17, 2008 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. Link to comment https://forums.phpfreaks.com/topic/120075-returning-form-post-data-to-top-window-from-pop-up/#findComment-618561 Share on other sites More sharing options...
cooldude832 Posted August 17, 2008 Share Posted August 17, 2008 asynchronous JavaScript and XML Link to comment https://forums.phpfreaks.com/topic/120075-returning-form-post-data-to-top-window-from-pop-up/#findComment-618562 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.