A problem with the WebBrowser control

  • Thread starter Thread starter Dom
  • Start date Start date
D

Dom

I have a prgram with a webBrowser control. The user can click on a
Linked Reference and the webBrowser control shows that site.

Sometimes the URL (not my program, but the URL I am browsing to) has
an "error on page", eg, a javascript error. My program then gives a
dialog box, stating the error, and all my users think I wrote a crummy
program.

IE somehow gets around this. It will simply write the phrase "error
on page" at the status bar along the bottom of the IE window. So
somehow it is catching the error and ignoring it.

Can I do this with the WebBrowser Control? I do not see an event like
"ErrorOnPage" that I can trap and handle.

TIA,
Dom
 
There are settings in IE to "disable script debugging" which suppresses
these dialogs. Since the WebBrowser control wraps IE, you would probably
need to find the Registry entries to modify programmatically for your app.
Peter
 
There are settings in IE to "disable script debugging" which suppresses
these dialogs. Since the WebBrowser control wraps IE, you would probably
need to find the Registry entries to modify programmatically for your app.
Peter










- Show quoted text -

Your reply made me think that maybe I should be looking for a property
and not an event. Then I found a property called
"ScriptErrorsSurpressed", and that seems to have done the trick.


Dom
 
Excellent. Thanks for that discovery, in case I ever need it.
Peter
There are settings in IE to "disable script debugging" which suppresses
these dialogs. Since the WebBrowser control wraps IE, you would probably
need to find the Registry entries to modify programmatically for your app.
Peter










- Show quoted text -

Your reply made me think that maybe I should be looking for a property
and not an event. Then I found a property called
"ScriptErrorsSurpressed", and that seems to have done the trick.


Dom
 
Back
Top