【发布时间】:2015-08-20 01:55:27
【问题描述】:
我有一个提交下载文件后的表单。我想自动而不是自动下载文件..来显示模式对话框并显示下载链接。
<form name="softwareform" id="softwareform" action="../downloadlink.php" method="POST" align="left">
<div class="input-group margin-bottom-sm">
<span class="input-group-addon">
<i class="fa fa-windows fa-fw"></i>
</span>
<input class="form-control" type="text" placeholder="Software Title" name="softtitle" id="softtitle">
</div>
<button type="submit" class="btn btn-primary" >
<i class="fa fa-cogs"></i>Download File
</button>
</form>
在下载 link.php 中,我在使用标头处理后重定向到下载文件。 这是我要显示的模态对话框。
<div class="modal fade bs-modal-sm" tabindex="-1" role="dialog" aria-labelledby="mySmallModalLabel" aria-hidden="true">
<div class="modal-dialog modal-sm">
<div class="modal-content" id="dialog-download">
<br/><br/>
<h2>Your Download is ready.</h2>
<hr/>
Your Download link is here <br/>
</div>
</div>
</div>
如何在表单提交后显示此对话框? 提前致谢
【问题讨论】:
-
@Epodax 我可以从第二个表单回显下载链接,但是如何在第一个表单上触发它?谢谢
-
@Epodax No....我想在第一页上显示模式....不在进程页面上..我想显示而不是重定向
-
查看 Namit 的回答 :) 它解释了我试图比我做得更好的东西。
标签: php jquery forms twitter-bootstrap