[WB] Solution to close a popup by click outside October 16, 2018 04:08PM |
Registered: 5 years ago Posts: 141 |
window.onclick = function(event) { var el=event.target; if (el.style.left==="0px"&&el.style.top==="0px"&&el.id==="") {close_Popup();} }Next we need the close_Popup function, which is a WL browser function:
PROCEDURE close_Popup() PopupClose(Popup_MyPopup) PopupClose(Popup_MyPopup2) //you can add more popups that you wish to closeAs you can see, adding more popups to the close_Popup function will close those too. PopupClose will not generate an error if a popup is not open. But if you have more than one open at the same time, all listed popups will be closed.
Re: [WB] Solution to close a popup by click outside October 16, 2018 04:40PM |
Registered: 5 years ago Posts: 74 |
Re: [WB] Solution to close a popup by click outside October 17, 2018 09:21AM |
Registered: 5 years ago Posts: 141 |
Re: [WB] Solution to close a popup by click outside October 18, 2018 01:32PM |
Registered: 5 years ago Posts: 141 |