I created a window using the window.open
method to display a form. Once the user submits the form, they are redirected to a page called success.html
. Is there a way to trigger an event after success.html
finishes loading? I attempted the following approach:
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);
However, no events seem to be triggered.