Passing array between ASP script(vbscript) and javascript 
Author Message
 Passing array between ASP script(vbscript) and javascript

I am trying to pass VBScript array on the server side to
the client side in javascript. But failing. Is there a way
to do this.

Many Thanks



Wed, 20 Oct 2004 20:49:13 GMT  
 Passing array between ASP script(vbscript) and javascript
Probably need to output the array as a string in the html, then convert back
the other end.


Quote:
> I am trying to pass vbscript array on the server side to
> the client side in javascript. But failing. Is there a way
> to do this.

> Many Thanks



Wed, 20 Oct 2004 21:54:54 GMT  
 Passing array between ASP script(vbscript) and javascript
<HEAD>
<TITLE></TITLE>
<Script>
var arArray = new Array();

<%
Private intCount

For intCount = 0 To UBound(arVBArray) '-- Created elsewhere
response.write "arArray[" & intCount & "] = '" & arVBArray(intCount) & "'";
Next
%>

</script>
</HEAD>

You may want to encode the VScript output to cater for apostrophe's, which
would create illegal Javascript ... perhaps replace them with "\'" or
whatever you feel is best. You need to accomodate for carriage returns
aswell.


Quote:
> I am trying to pass vbscript array on the server side to
> the client side in javascript. But failing. Is there a way
> to do this.

> Many Thanks



Wed, 20 Oct 2004 23:06:33 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Pass javascript array to a ASP recordset

2. Passing Arrays ASP to Javascript

3. Returning arrays from VB/VC components or VBScript to JavaScript in ASP

4. vbscript, ASP, javascript, and two dimentional arrays

5. passing array from javascript to vbscript

6. Passing VBScript array to JavaScript function

7. passing arrays from vbscript to javascript

8. How to pass an n-dim array from VBScript to JScript within an ASP page

9. Passing Arrays between ASP/VBScript and ActiveX Components...

10. Passing Multi-Dimensional arrays to COM objects from VBScript/ASP

11. Passing array from ASP (VBScript) to DLL and back

12. Passing Arrays between ASP/VBScript and ActiveX Components...

 

 
Powered by phpBB® Forum Software