fnConvertArray() fnConvertArray(...) DESCRIPTION This function takes a one or two dimensional VBScript array or a Jscript array as an argument and returns a Jscript array. Jscript arrays are left unchanged. SYNTAX fnConvertArray(ArrayName, [iDimensions]) EXAMPLE <%@ Language=Jscript %> <% Response.Buffer = true; %> <% //-->-->-->-->-->-->-->-->--> var aaCon = new Array(); var aaBB = new Array(); aaCon[1] = "203.62.157.199"; aaCon[2] = "mjb"; aaCon[3] = "mjb"; aaCon[4] = "mjbData"; aaBB = fnConvertArray(aaCon); //--<--<--<--<--<--<--<--<--< %> RESULTS ?? PARAMETERS aa {vb/jscript Array, required} the array to be converted to a Jscript format array (Jscript arrays are left unchanged). iDimensions {integer, default=1} This parameter has not been implemented yet. It will allow the conversion of Two Dimension VB script arrays into Jscript arrays (which are arrays of arrays) STATUS The one dimensional version is working, tested 30%, two dimensional version is not written DEPENDENCIES fnErrorMessage.asp PROGRAMMER Matthew Bishop (matthew@massive.com.au or matth3wbishop@yahoo.com) LOCATION c:http://www.geocities.com/matth3wbishop/eg/asp/ --> fnConvertArray.asp DOCUMENTATION http://www.geocities.com/matth3wbishop/eg/asp/ COMMENTS: small utility function a) One method of converting two dimensional arrays might be as follows -- call a VBScript routine which will find the dimension sizes of each of the dimensions of the VB array -- use the VBarray method of Jscript to convert the VB array into a one dimension Jscript array -- Use an EVAL statement to concatenate a string such as aaJS = {{"one", "two", "three"}, ("uno", "duo", "tres"}, {"un", "deux", "trois"}}; which creates a two dimensional JS array. ADDITIONAL EXAMPLES