469,348 Members | 1,266 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,348 developers. It's quick & easy.

suppress Javascript error messages in vb .net

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...b;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...b;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

May 31 '07 #1
2 6365
ZeeHseez,

Forget it, in a way you are being busy inside the security issues, this kind
of stuff is changing all the time.

Just my idea,

Cor

<Ze******@gmail.comschreef in bericht
news:11*********************@m36g2000hse.googlegro ups.com...
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...b;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...b;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

Jun 1 '07 #2
On May 31, 11:55 pm, "Cor Ligthert [MVP]" <notmyfirstn...@planet.nl>
wrote:
ZeeHseez,

Forget it, in a way you are being busy inside the security issues, this kind
of stuff is changing all the time.

Just my idea,

Cor

<ZeeHs...@gmail.comschreef in berichtnews:11*********************@m36g2000hse.go oglegroups.com...
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 usedhttp://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.htmland
http://support.microsoft.com/default...b;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- Hide quoted text -

- Show quoted text -
Thank you! but i really need to be able to suppress those stupid
javascript error messages.
If you know how, please let me know

Jun 1 '07 #3

This discussion thread is closed

Replies have been disabled for this discussion.

By using this site, you agree to our Privacy Policy and Terms of Use.