Jump to content

Submit Form Then Open PopUp Window


Riparian

Recommended Posts

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

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 .

 

 

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.

 

 

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.