Riparian Posted March 8, 2011 Share Posted March 8, 2011 Scenario. I have a simple form and on the same page a link to open a popup window. The client completes the form then click the upload link. In the popup window the client uploads a file. Problem On closing the popup window the main page is refreshed (to indicate the upload was successful) As the form was not initially submitted - All Form Data is then Lost Question Is there a way of submitting the form and opening a popup window at the same time (to preserve the data entered by the client) or is there another fix for this problem ? Any help is greatly appreciated. Cheers Link to comment https://forums.phpfreaks.com/topic/230039-submit-form-then-open-popup-window/ Share on other sites More sharing options...
Mahngiel Posted March 9, 2011 Share Posted March 9, 2011 if you're passing the information to the popup menu from the form they've filled out, you could use the GET method and instruct the pop up to pull it's info from the url Link to comment https://forums.phpfreaks.com/topic/230039-submit-form-then-open-popup-window/#findComment-1184833 Share on other sites More sharing options...
Riparian Posted March 9, 2011 Author Share Posted March 9, 2011 Thank you for the reply. To be able to obtain the input info in the get variables I still have to submit the form. My problem is that I do not know how to open a popup window immediately after the form is submitted while still keeping the parent window open . Link to comment https://forums.phpfreaks.com/topic/230039-submit-form-then-open-popup-window/#findComment-1184837 Share on other sites More sharing options...
Krash Posted March 9, 2011 Share Posted March 9, 2011 Not sure what you're trying to do, but you can add an onClick event to the 'submit' input that will submit the form data and open a popup at the same time. <input type="submit" value="Upload" onClick="window.open('http://www.your_url.com/popup_content.htm','popup_player','height=200,width=300,top=150,left=300,scrollbars=no')"> The popup will open over the parent window. Link to comment https://forums.phpfreaks.com/topic/230039-submit-form-then-open-popup-window/#findComment-1184848 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.