jquery.AreYouSure
jquery.AreYouSure copied to clipboard
Click on the anchor tag will popup the message in IE
If you have anchor tag with href="jquery:void(0)" in the form and click on the anchor tag it will generate beforeunload event. I hope we can have some kind of workaround so that it doesn't do that on IE9/10
Is that an anchor to submit the form? Are you able to post some example code so I can better understand the issue.
I set up the test page on my site. http://skoizumi.com/areyousure/ you will see on chrome/firefox it doesn't bring up the "are you sure" dialog when click on "just popup" but in IE9/10 after "hello" you will see the "are you sure" dialog. I wonder if we can make some kind of workaround within the plugin.
Thanks for the existing code. I now understand.
There is an IE issue/bug. It's raising the "onbeforeunload" event even though the links do not cause browser to leave the exiting page. The only easy solution I can see is to use href="#" instead. It's discussed in this Stack Overflow article:
http://stackoverflow.com/questions/7263309/onbeforeunload-event-is-too-enthusiastic-in-ie9
I can't think of a way to address this within the AreYouSure plugin itself (other than say automatically rewriting your href="javascript:void(0)" links for you).