
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