I have an application that uses WebBrowser control to navigate from page to page, on some pages I get a leaving popup asking me if that's what I want to do.. this stops the whole further execution until I press "Leave" or "Stay".. How can I disable them?
What I've tried so far were these actions: a) setting window.onbeforeunload = null; b) setting alert, confirm, prompt to an empty function c) settin suppressErrorMessages to true
but even so, I still get the nasty message in the end.
I mostly relied on this answer: How to update DOM content inside WebBrowser Control in C#?
But so far without a success. The alerts seem to be jQuery alerts because they have custom texts (instead of OK Cancel, they have Stay Leave)..
Any help hugely appreciated!!