简体   繁体   中英

bootbox.js alert modal - closing the bootstrap modal behind it

I have a bootstrap modal which I am using as a form to capture information that will be committed to a database.

I am currently implementing my Javascript field validtions on various inputs and drop downs. I wish to pop up a specific bootbox.alert with a message. Example:

    if ((dropDownValueOne === 'Please select') || (dropDownValueTwo === 'Please select')) {

    bootbox.alert("Warning: Please confirm that you have selected a drop down value for both drop down A and drop down B.");                                                

}

The above is working just fine when it comes to displaying the error when applicable. Unfortunately it dismisses the modal being used for capturing the information in the process, is there any way I could avoid this when presenting the error bootbox modal?

结束这个我发现我的问题,在我的保存按钮上有data-dismiss="modal" :(

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM