I have a window that I am creating via window.open
. This window displays a form. When the form is submitted, the user is taken to a new page: success.html
. How can I trigger an event after success.html
loads? I've tried to following:
var myWindow = window.open("http://theform.com", "THE_NAME",
"menubar=no,location=no,resizable=no,scrollbars=no,status=no,width=500,height=463");
myWindow.addEventListener("load", (event) => {
console.log("Window event" + myWindow.location.href);
}, false);
No events are triggered.