DHTML Lab: JavaScript Enhancement with VBScript
JavaScript Enhancement with VBScript
inter-language communication for Explorer
This tutorial can be appreciated by users of any browser, any version. The in-line examples will work on all browsers, but the display will be browser-specific. The VBScript examples will display only in Explorer 4.
VBScript???
No, I'm not going crazy. Yes, JavaScript is the Web scripting standard, and yes, JavaScript is the script language of DHTML Lab, and yes, we will continue to use it exclusively.
However, much of the "cross-browser" code we have created here is really a single script that contains browser-specific code for both browsers. We often use browser-specific features in a cross-browser script.
That's what we'll be doing this column: using extended features of Explorer for added functionality. No knowledge of VBScript is necessary. All VBScript enhancements will be called from JavaScript, with the simplest of routines.
The only pre-requisite for appreciating this column is a knowledge of the JavaScript alert(), confirm() and prompt() methods, which we have all used since JavaScript 1.0 (Navigator v2). In this column, we'll learn how to enhance these methods through JavaScript-VBScript communication.
In This Column
We will discuss:
- in-line VBScript coding
- using the HTML4 LANGUAGE attribute
- VBScript function creation
- the VBScript MsgBox() function
- the VBScript InputBox() function
- using these functions from JavaScript
First let's discuss the reasons for enabling communication between the two languages.
Produced by Peter Belesis and
All Rights Reserved. Legal Notices.Created: Nov. 18, 1998
Revised: Nov. 18, 1998
URL: https://www.webreference.com/dhtml/column22/