[英]Is there any way to stay on same bootstrap modal after submitting the form?
<form id="upload_form" method="post" action="uploadfile.asp">
<div class="row">
<input type="file" name="file" id="file" accept=".csv,.xls"/></span>
<input type="submit" value="submit">
</div>
</form>
This form is on bootstrap modal. 此表格为自举模式。
uploadfiles.asp, I am using FreeASPUpload class that I got from internet. uploadfiles.asp,我使用的是从互联网上获得的FreeASPUpload类。
if Upload.UploadedFiles.Count = 1 Then
Response.redirect("/admin/login_list_import.asp?file_upload=1-0")
else
Response.write("No files sent or only one file required. Script is OK!<br>") ' Say to Flash that script exists and can receive files
End IF
when I submit the form it redirect me to login_list_import.asp page. 当我提交表单时,它将我重定向到login_list_import.asp页。
I want to stay on the same modal after submitting the form. 提交表格后,我想保持原样。 Is there any way to do this?
有什么办法吗?
I think when you are redirected to the page 我想当您重定向到页面时
login_list_import.asp?file_upload=1-0 login_list_import.asp?file_upload = 1-0
using the same condition (file_upload=1-0), you can manually fire the js code to open the modal window on page load 使用相同的条件(file_upload = 1-0),您可以手动触发js代码以在页面加载时打开模式窗口
For example 例如
<%
if Request.Querystring("file_upload")="1-0" then
%>
<script type='text/javascript'>
$( document ).ready(function() {
$('#divmodal').modal('show');
});
</script>
<%
end if
%>
通过Ajax-Request发送Formdata。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.