
Returning arrays from VB/VC components or VBScript to JavaScript in ASP
Hi,
I was reading this topic and hope now you can help me shortely.
I try to return an array as return value from a vb com function to an asp
vbscript array variable.
dim arr()
arr() = mycommfunction(dd)
this is the vb function:
Public function mycommfuntion(byval dd as string) as variant()
You wrote here that you haden't any problems to pass the returnvalue to a
var in VBScript.
Quote:
>>> If I receive the return value in a VBScript variable, it works fine!!
could you give me a hint how you've done this?
thx
Chris
Quote:
> you can only have primative types as return values (int, byte, *void,
> ect...)
> the reason it works in vb is because it defaults to passing the data
> stucture (array)
> by reference instead of by value. It's strange becuase i would also thank
> the the
> defualt would be the same in javascript. You need a way to make it return
> by reference
> (by pointer) because retuning an array by value is illegal in most
> languages.
> -bryan
> > I was trying to return an array from a VB COM component to my ASP which
is
Quote:
> > coded in JavaScript.
> > The JavaScript variable does not get any value.
> > If I receive the return value in a VBScript variable, it works fine!!
> > I could not even return an array from a VBScript function to a
JavaScript
Quote:
> > variable.
> > I need to pass an array of strings from a VB/VC COM component to a
> > JavaScript variable in my
> > ASP. Is there a way to do this?!
> > thanks :)
> > - Zubin
Quote:
> you can only have primative types as return values (int, byte, *void,
> ect...)
> the reason it works in vb is because it defaults to passing the data
> stucture (array)
> by reference instead of by value. It's strange becuase i would also thank
> the the
> defualt would be the same in javascript. You need a way to make it return
> by reference
> (by pointer) because retuning an array by value is illegal in most
> languages.
> -bryan
> > I was trying to return an array from a VB COM component to my ASP which
is
> > coded in JavaScript.
> > The JavaScript variable does not get any value.
> > If I receive the return value in a VBScript variable, it works fine!!
> > I could not even return an array from a VBScript function to a
JavaScript
> > variable.
> > I need to pass an array of strings from a VB/VC COM component to a
> > JavaScript variable in my
> > ASP. Is there a way to do this?!
> > thanks :)
> > - Zubin