0

I have a simple modal that is used to insert the details of files to a MySQL table; like file_no, file_name, date_opened, relevant_subject, status etc.....

The modal is working fine and inserted data to the table correctly. There are large no of files to be entered to the system at the moment. Therefore, I want to keep the modal open always till click the window close button by the user. What can be the JavaScript code apply for the modal ? Can anyone help me ? I tried the following code already. But didn't get the expected ...??

<script type="text/javascript">
jQuery(window).load(function(){
    jQuery('#modal').modal('show').on('hide.bs.modal', function(e){
      e.preventDefault();
    });
});
</script>
mcode
  • 87
  • 10
  • Does this answer your question? [prevent bootstrap modal window from closing on form submission](https://stackoverflow.com/questions/18893814/prevent-bootstrap-modal-window-from-closing-on-form-submission) – Vickel Aug 09 '20 at 12:09
  • @ Vickel. I added as per your direction as follows. . But not working – mcode Aug 09 '20 at 12:17
  • there are several approaches in that post... – Vickel Aug 09 '20 at 12:32

0 Answers0