October 31, 1999 - Combining JavaScript and VBScript

Yehuda Shiran October 31, 1999
Combining JavaScript and VBScript
Tips: October 1999

Yehuda Shiran, Ph.D.
Doc JavaScript

Unlike Netscape Navigator, Microsoft Internet Explorer supports VBScript, a scripting language based on Visual Basic. So if you're creating a cross-browser script, you can take advantage of VBScript for the Internet Explorer solution. VBScript is often a helpful addition, because it is tightly integrated with the user's platform through OLE Automation. JavaScript and VBScript are both loosely typed languages, so you don't need to worry about data types. Normally, you'll use JavaScript to invoke a function in a VBScript script:

<SCRIPT LANGUAGE="JavaScript">
<!--
function jsFunction() {
  vbFunction();
}
// -->
</SCRIPT>
<SCRIPT LANGUAGE="VBScript">
<!--
Sub vbFunction
  // do something
End Sub
// -->
</SCRIPT>

These two languages can be combined to create useful scripting solutions that are otherwise impossible.