J
John MacIntyre
Hi,
Can anybody give me a hint as to how to convert a javascript array into a
vbscript array?
BTW-it only needs to work in IE5 & 6
Thanks in advance,
John MacIntyre
VC++ / VB / ASP / Database Developer
http://www.johnmacintyre.ca
Here's some sample code I threw together to explain the problem.
-----------------------------------------------------
<%@ Language=VBScript %>
<html>
<script language=javascript>
function getJSArray()
{
var retArray new Array();
retArray[0] = new Object();
retArray[0].firstName = "Joe";
retArray[0].lastName = "Doe";
retArray[1] = new Object();
retArray[1].firstName = "Sally";
retArray[1].lastName = "Struthers";
return retArray;
}
</script>
<body>
<%
dim myArray()
dim nLoopCnt
dim oName
myArray = getJSArray()
for nLoopCnt = 0 to 3
oName = myArray(nLoopCnt)
Response.Write "<P>" & oName.firstName & " " & oName.lastName &
"</P>"
next
%>
</body>
</html>
Can anybody give me a hint as to how to convert a javascript array into a
vbscript array?
BTW-it only needs to work in IE5 & 6
Thanks in advance,
John MacIntyre
VC++ / VB / ASP / Database Developer
http://www.johnmacintyre.ca
Here's some sample code I threw together to explain the problem.
-----------------------------------------------------
<%@ Language=VBScript %>
<html>
<script language=javascript>
function getJSArray()
{
var retArray new Array();
retArray[0] = new Object();
retArray[0].firstName = "Joe";
retArray[0].lastName = "Doe";
retArray[1] = new Object();
retArray[1].firstName = "Sally";
retArray[1].lastName = "Struthers";
return retArray;
}
</script>
<body>
<%
dim myArray()
dim nLoopCnt
dim oName
myArray = getJSArray()
for nLoopCnt = 0 to 3
oName = myArray(nLoopCnt)
Response.Write "<P>" & oName.firstName & " " & oName.lastName &
"</P>"
next
%>
</body>
</html>