VBArray object (Object/JScript)

A special JScript object for interacting with Visual Basic or VBScript array data.

Availability:

JScript - 3.0
Internet Explorer- 4.0
JavaScript syntax:IEmyVBArray = new VBArray()
IEmyVBArray = new VBArray(aVisBasArray)
IEmyVBArray = VBArray
Argument list:aVisBasArrayAn array created inside Visual Basic or VBScript
Object methods:dimensions(), getItem(), lbound(), toArray(), ubound()

Because VBScript is only available on the Windows platform, this object has limited use in portable applications.

You might find it useful in an intranet scenario where you have total control over which browsers are deployed to the users. In that case, you know that your pages will be viewed on a compatible platform and can happily use this object with impunity.

Warnings:

Example code:

   <!-- An example taken from Wrox: Professional JavaScript -->
   <SCRIPT LANGUAGE="VBScript">
   function getArray()
   dim arrVB(1)
   arrVB(0) = 100
   arrVB(1) = 250
   getArray = arrVB
   End function
   </SCRIPT>
   <SCRIPT LANGUAGGE="JavaScript">
   var vbArr = new VBArray(getArray());
   </SCRIPT>

MethodJavaScriptJScriptNIEOperaNESECMADOMCSSHTMLNotes
dimensions() n/a3.0 3.0 n/a4.0 4.0 n/a n/a n/a n/a n/a n/a-
getItem() n/a3.0 3.0 n/a4.0 4.0 n/a n/a n/a n/a n/a n/a-
lbound() n/a3.0 3.0 n/a4.0 4.0 n/a n/a n/a n/a n/a n/a-
toArray() n/a3.0 3.0 n/a4.0 4.0 n/a n/a n/a n/a n/a n/a-
ubound() n/a3.0 3.0 n/a4.0 4.0 n/a n/a n/a n/a n/a n/a-