IDocHostShowUI works for Javascript not VBScript?

From: Billy (Billy_at_summer.org)
Date: 03/16/04


Date: Tue, 16 Mar 2004 00:48:01 -0500

Hi,

I'm trying to add code to prevent alert(), prompt() dialog boxes. The
recommended way is to implement IDocHostShowUI.

I ran through the example provided at
http://www.faisoncomputing.com/samples/programming_samples.htm

but ShowMessage() never gets called if the dialog box comes from VBScript.
It *sometimes* works if the dialog box is called from JavaScript.

VBScript
---------
<html>
<script language="vbscript">
MsgBox 'hello world'
</script>
</html>

Javascript
----------
<html>
<script>
alert('hello world');
</script>
</html>

Any idea why the difference and the lack of predictability?

Thanks.



Relevant Pages