|
-
May 10th, 2002, 04:53 AM
#1
Thread Starter
Member
Pass array from Javascript to VB
Anyone know how I can pass a 2D array from my javascript fxn. to a VB dll. This is what I have at the moment and it doesn't work ...
//////////////// Javascript //////////////////////////////
function btnSave_onclick(){
var myArray = new Array ()
for (i=1; i < 10 ; i++){
myArray[i,0] = 'some value';
myArray[i,1] = 'some other value';
}
PageObject.execute.VB_DLL_Fxn(myArray);
}
///////////////////VB DLL //////////////////////////////////
Public function VB_DLL_Fxn ( aArray as Variant)
Dim i As Integer
Dim strMsg As String
If IsArray(aArray) Then
For i = 1 To UBound(aArray , 1)
MsgBox aArray (i, 0) & "-" & aArray (i, 1)
Next
Else
MsgBox "Not an array"
End If
Exit Function
EH:
Err.Raise Err.Number, , Err.Description
End Function
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|