|
<< Click to Display Table of Contents >> Navigation: Forum > How to close modal window when clicking on the background form |
03-19-2018, 05:58 PM:
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?
03-20-2018, 12:27 PM:
Do it with JavaScript:
window.onclick = function(event) {
var modal = document.getElementById("modalName");
if (event.target == modal) {
modal.style.display = "none";
}
}