axWebBrowser script error 脚本错误

来源:互联网 发布:科汛cms 编辑:程序博客网 时间:2024/06/05 08:51
转载自http://www.itwriting.com/phorum/read.php?3,3531,3975,quote=1


After doing some searching on the web, some of the possible solutions that I've seen included:


1) setting aXWebBrowser.Silent = true at anappropriate time. The downside of this approach is that some of the pop-ups are useful, such as authentication prompts etc.

2) implementing IOleDocumentSite, IOleClientSite and IDocHostShowUI interfaces and using IDocHostShowUI:confused smileyhowMessage for the purpose of intercepting the message box. I have attempted this but am yet to see the ShowMessage function invoked...

3) implementing IOleCommandTarget and the QueryStatus and Exec methods, and then watching out for the Exec invocation with OLECMDID_SHOWSCRIPTERROR. From what I understand this behaviour doesn't work if Disable Script Debugging check box is cleared in Internet Explorer settings.