Form: how does one pop up a new window to call php for processing and return to the original window?

Source: Internet
Author: User
In form, how does one pop up a new window to call php for processing and return to the original window? This is the case. in the first window, a form is used to upload files. After the file is uploaded, open window 2 and use a php file to process the file (for example, copy it to a location). then, php will return the location of the file to window 1. Window 1: & lt; form & gt; & lt; inputtypesubmit & gt; & lt; inpu & gt; & lt; form, and return to the original window?
This is the case. in the first window, a form is used to upload files. After the file is uploaded, open window 2 and use a php file to process the file (for example, copy it to a location). then, php will return the location of the file to window 1.

Window 1:


Window 2:
Php code. call the insertText function in window 1 and return the result.


Who can provide a solution? Now I use form action = 'A. Php ", the result is not good. The new php window will overwrite the original window. I can't move the first window.

Thank you. I spent a day searching for various materials. The foundation is not good. could you please help me ~


------ Solution --------------------
Ajax.
I remember that jquery has an upload plug-in.
------ Solution --------------------
Iframe does not need to upload new files. of course, there are other methods. The key is the target attribute of the form tag, which determines where the form page is opened.
PHP code

------ Solution --------------------
Http://download.csdn.net/detail/blizzf99/3987209

Can this help me.


------ Solution --------------------
Add it to your Upload method (a. php)
PHP code
Echo "script history. back (); script"
------ Solution --------------------
In this case, it is better to click a new window in the first window to process the uploaded file, and then use JS window. opener to return the value to the specified position in the previous window.

The moderator is talking about the uploadify plug-in, right?
------ Solution --------------------
The second window:
......
Echo 'script window. opener. abc (); script ';
?>

Window 1:
Function abc (){
......
}

Is this the case?

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.