IDocHostShowUI works for Javascript not VBScript?
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
- Re: Attaching functions to events, from external JS files
... >pre-existing HTML content using JavaScript DOM Level 1. ... >adding this type of contents doesn't require to write hardcoded HTML ... >that Mozilla doesn't support CSS. ... like they disable script. ... (comp.lang.javascript) - Re: Can I use VBScript instead of JavaScript in FrontPage?
... Scroll down to: Date object constructor and click to open the page. ... instead of the default JavaScript. ... Is there a specific reason why you must use VBScript client-side instead of the ... I also read that if a client does not use MS/IE, the validation script ... (microsoft.public.frontpage.programming) - Re: how to Enable/Disable textbox dynamically
... I think that to recommend doing things for the sake of formal correctness alone without saying as much is a mistake, it undermines the credibility of your recommending doing things that are formally correct where doing them or not may make a difference, such your recommendation to correct the structural invalidity in the mark-up by not placing the SCRIPT elements as the first children of the HTML element ). ... Apart from demonstrating the use of a non-existing MIME type for javascript, they specified a TYPE attribute for SCRIPT elements but forgot to mirror it in NOSCRIPT element attributes but the NOSCRIPT content would not be shown either because javascript would be enabled on the browser). ... (comp.lang.javascript) - Re: Ajax / Javascript Fallback
... "Weil es HTML von sich aus kann" ist kein ... die an Javascript gar nicht interessiert sind, ... in jedem Fall immer das gesamte verändernde Script herunterladen. ... Das ist ein Argument. ... (de.comp.lang.javascript) - Re: Why do this?
|