Supress message boxes in AxWebBrowser?

G

Guest

Here's the problem:

I've got an AxWebBrowser control on a form that I'm writing in c#. I have
an algorithm which navigates through different pages on the control. I'd
like to be able to supress message boxes that pop up while I'm navigating the
pages. The 'Silent' property does not do this, because it is
vbscript/javascript functions like msgbox() that are the problem.

For example, if I navigate to the site http://fpe.com, you'll notice that if
you wait a couple of seconds after the page has loaded completely, a message
box will popup. I can't figure out a good way of suppressing or dismissing
these message boxes when navigating within the AxWebBrowser.

It would probably be possible to monitor for message boxes in my application
in another thread and simulate mouse clicks on the boxes. However, it's not
always easy to know which button to click if cancelling the dialog is not
available.

So, basically, is there a way to suppress these dialogs and prevent them
from appearing in my AxWebBrowser control. I don't want ANY popups at all,
so even a solution that prevents all popups would be great.

Thanks so much in advance!

Aaron
 
A

AlexS

Disable everything you don't want in IE - see Options/Security and Advanced
tabs.

HTH
Alex
 
G

Guest

I had actually done that, but the problem is that disabling scripting causes
some webpages to display incorrectly. For example, maps.google.com will not
display if scripting is disabled.

Preferably, I'd like to keep the webpages looking correctly. Thanks for the
suggestion.

Aaron
 
L

Lloyd Dupont

hey, this map is definitely very interesting!

now I understand why American they are the only one earth, it's because
their map is not accurate! (80% of it is missing)
hihi...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top