Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to close modal window when clicking on the background form
#1
Hello,

Making a modal window is quite straightforward as per your demo. Quick question. I have seen several websites where clicking on the non-modal part of the web page is effectively doing a cancel on the modal form. Is there an easy way to accomplish this in intraweb?
Reply
#2
Do it with JavaScript:

window.onclick = function(event) {
var modal = document.getElementById("modalName");
if (event.target == modal) {
modal.style.display = "none";
}
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)