form上传文件,怎么弹出新窗口调用php处理,并返回原窗口

WBOY
Release: 2016-06-13 10:09:03
Original
1501 people have browsed it

form上传文件,如何弹出新窗口调用php处理,并返回原窗口?
情况是这样的,第一个窗口有一个form 用于上传文件。上传完文件后打开窗口二,用一个php去处理这个文件(比如说复制到某个位置),然后php要把这个文件的位置返回给窗口1。

窗口1:





窗品2:
php代码,调用窗口1中的insertText函数,把结果返回。


谁能给个办法?我现在用form action=‘a。php",结果不行,新的php窗口会把原来的窗口冲掉。我是想不动第一个窗口。

谢谢了,我搞了一天,找了各种资料。无奈基础不行,求各位大能帮忙啊~


------解决方案--------------------
ajax. 
我记得jquery 有个上传的插件.
------解决方案--------------------
iframe无刷新上传文件是一种解决方法,当然还有其它的办法,关键在form标签的target属性,它会决定表单页面在哪里打开
PHP code
Copy after login

------解决方案--------------------
http://download.csdn.net/detail/blizzf99/3987209

看这个能帮上忙不。


------解决方案--------------------
在你上传的方法(a.php)中 加入
PHP code
echo "<script>history.back();</script>"<br><font color="#e78608">------解决方案--------------------</font><br>你这样的话,还不如在第一个窗口中,点击弹出一个新窗口处理好上传文件后,再用JS  window.opener把值返回之前窗口指定位置中。<br><br>版主说的是uploadify这个插件吧?<br><font color="#e78608">------解决方案--------------------</font><br>第二个窗口:<br><?php <br />……<br>echo '<script>window.opener.abc();</script>';<br>?><br><br>窗口1:<br>function abc() {<br>……<br>}<br><br>这样行不?<div class="clear">
                 
              
              
        
            </div>
Copy after login
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!