Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

bboyjayz

macrumors member
Original poster
Mar 20, 2009
55
0
hi,
i would like to know if it's possible to block alert generated by javascript into a webview ? Thank you for your answers.
 
hi,
i would like to know if it's possible to block alert generated by javascript into a webview ? Thank you for your answers.

I may be out of my mind for saying this, but you could download whatever the page's code is (html, css, java etc. files) and then parse them to see if threre's an alert in it, delete the alert in the document if its there, and then have the UIWebView reread the edited document, I don't think this would be efficient though, I think it would take an awful long time just to load one web page.

Dan
 
that's 'cause i had an idea for an app... and alert can't be accepted because it can freez the game.. :(
 
Yes, it's a kind of quiz, using webview ... it's hard to understand :) but if i meet a webpage with Alert() javascript, it'll freez my app .. :s
 
Yes, it's a kind of quiz, using webview ... it's hard to understand :) but if i meet a webpage with Alert() javascript, it'll freez my app .. :s
So, you don't have control of the webpages that are being displayed in your app? Besides, once the user clicks the OK on the alert, the app continues, yes?
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.