Handling annoying JavaScript alerts
I'm working on a web browser automation project. I'm using the .NET WebBrowser object for all of this. Certain pages have a JavaScript alert popup when the page is loaded. This stops the program until someone physically clicks on ok or closes the Alert. I've tried DestroyWindow, GetLastActivePopup, closeWindow and SendKeys but no luck. What else can I do??????
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.

Kirtan PatelRank #292 · 8.6K reputationPosted Oct 14, 2008, 5:45 AM EDT
So Open
Internet Explorer > Tools> Internet Options >Security Tab
Click on "Custom Level " Button Find Option Active Scripting
and Select "Enable " Radio Button
Now it will not ask you for Any Script Confirmation :)
You Can Do this Thing Programmatically also By Registry programming using System.Win32 Class
by Changing DWORD Values of Security Zones .
Hope This Will Help You
Kirtan Patel
Rob5 reputationPosted Oct 14, 2008, 7:40 PM EDT