Z
ZeeHseez
Hi,
I have written a webbrowser application in VB .net Framework 1.1. I
would like to suppress javascript error messages. However, the silent
property of the webbrowser control suppresses the Javascript
messages,
but it also blocks any other dialog box, such as Login dialog, i
can't
use the silent property.
I used http://support.microsoft.com/default.aspx?scid=kb;EN-US;279535
article to suppress the error messages. It works fine until a user
hits the refresh button, so the WebBrowser::NavigateComplete Event is
not called, therefore, the error messages are not called. Another
issue with this approach is that it will only trap javascript errors
on the page that doesn't have any frames.
I was then asked to implement Implements "IDocHostUIHandler" and
"IOleCommandTarget".
I implemented both interfaces using these articles
http://www.thescripts.com/forum/thread47988.html and
http://support.microsoft.com/default.aspx?scid=kb;EN-US;261003
I can trap all the functions and subs that belong IDocHostUIHandler.
But the function that i really need to trap is
IOleCommandTarget::Exec, because returning true in this method, will
cause the javascript error message to be suppressed. But for some
strange reason, the IOleCommandTarget::Exec is never called.
I have tried to inculde as much information as possible but if
there's
anything unclear, please let me know.
If any knows how to implement IOleCommandTarget in vb .net, please
let
me know.
Any help would be greatly appreciated
I have written a webbrowser application in VB .net Framework 1.1. I
would like to suppress javascript error messages. However, the silent
property of the webbrowser control suppresses the Javascript
messages,
but it also blocks any other dialog box, such as Login dialog, i
can't
use the silent property.
I used http://support.microsoft.com/default.aspx?scid=kb;EN-US;279535
article to suppress the error messages. It works fine until a user
hits the refresh button, so the WebBrowser::NavigateComplete Event is
not called, therefore, the error messages are not called. Another
issue with this approach is that it will only trap javascript errors
on the page that doesn't have any frames.
I was then asked to implement Implements "IDocHostUIHandler" and
"IOleCommandTarget".
I implemented both interfaces using these articles
http://www.thescripts.com/forum/thread47988.html and
http://support.microsoft.com/default.aspx?scid=kb;EN-US;261003
I can trap all the functions and subs that belong IDocHostUIHandler.
But the function that i really need to trap is
IOleCommandTarget::Exec, because returning true in this method, will
cause the javascript error message to be suppressed. But for some
strange reason, the IOleCommandTarget::Exec is never called.
I have tried to inculde as much information as possible but if
there's
anything unclear, please let me know.
If any knows how to implement IOleCommandTarget in vb .net, please
let
me know.
Any help would be greatly appreciated