A
A
ashfedor2019-12-20 15:10:10
JavaScript
ashfedor, 2019-12-20 15:10:10

How to close modal window on bootstrap?

Good day!
On the site ashtest.pp.ua, on the button "Calculate cost" in the bootstrap modal window, a calculator form appears.
After the calculation, it is possible to print the result. with this script

function printDiv(divName) {
  var printContents = document.getElementById(divName).innerHTML;
  var originalContents = document.body.innerHTML;
  document.body.innerHTML = printContents;
  window.print();
  document.body.innerHTML = originalContents;}

And after printing, a problem appears - the modal window does not close.
the standard button of the bootrap window does not want to work
<button type="button" class="close" data-dismiss="modal" aria-label="Close">

I understand that it is the printout script that interferes, but there is not enough knowledge how to get around it.
Or maybe hang a page reload on the button to clear the form altogether?
In general, I will be glad to any suggestions.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question