jquery - Exit Pop Javascript not functioning properly -
I'm trying to pop out this work. So far, I can work on Mac in FF, Chrome and Safari, but I am struggling with IE, FF, Chrome for Windows. These are two snippets I have tried to do so far:
& lt; Script language = javascript & gt; Function thanks () {var win = window.open ("[url.com]", "_blank", "left = 20, top = 20, width = 500, height = 500, scrollbars = 1"); Win.focus (); } & Lt; / Script & gt; & Lt; Body onUnload = "thankYou ()" & gt; and
& lt; SCRIPT & gt; Function Thanks () {var ConfirmStatus = Confirm ("We want to get your feedback on your experience on this page. Do you want to complete our short survey?"); If (ConfirmStatus == true) {window.open ("[url]", "win", "left = 20, top = 20, width = 500, height = 500, scrollbar = 1"); } And {window.close (); }} Window.onunload = thankYou; & Lt; / Script & gt; Windows is not sure how it works, thanks in advance!
Changes:
& lt; Body onUnload = "thankyou ()" & gt; From to:
& amp; & Lt; Body onBeforeUnload = "thankYou ()" & gt; and ....
Changes:
window.onunload = thankYou; to:
window .onbeforeunload = thankYou;
Comments
Post a Comment