I am using UIWebView
to load a URL.
Inside the page of that URL, it uses alert("whatever msg")
as JavaScript. My UIWebView
will pop up a window and show that alert message.
Is there a way to disable this kind of popup window or JavaScript alert window?
Add this after your web view has loaded its content
[MyWebView stringByEvaluatingJavaScriptFromString:@"window.alert=null;"];