簡體   English   中英

提交表格后,有什么辦法可以保留在相同的引導程序模式上?

[英]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>

此表格為自舉模式。

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

當我提交表單時,它將我重定向到login_list_import.asp頁。

提交表格后,我想保持原樣。 有什么辦法嗎?

我想當您重定向到頁面時

login_list_import.asp?file_upload = 1-0

使用相同的條件(file_upload = 1-0),您可以手動觸發js代碼以在頁面加載時打開模式窗口

例如

<%
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.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM