in questo caso credo che bisogni usare eval. Ti passo un piccolo esempio
codice:
<%@ Language=VBScript %>
<%
option explicit
Response.Buffer = true
Session.LCID = 1040
onload
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<title>Pagina senza titolo</title>
<script type="text/javascript" src="../js/ajax.js"></script>
<script language="javascript" type="text/javascript">
// <!CDATA[
window.onload = function()
{
$("Button1").onclick = Button1_click;
}
var vettore = null;
function Button1_click()
{
ajax("a.asp?ajax_comando=1", onload);
function onload()
{
var t = this.request.responseText;
try
{
vettore = eval("(" + t + ")");
var s = "";
for(var i = 0; i < vettore.length; i++)
s += vettore[i] + "\n"
alert(s);
}
catch (err)
{
alert("Errore nell'analizzare l'oggetto ricevuto");
return;
}
}
}
// ]]>
</script>
</head>
<body>
<input id="Button1" type="button" value="richiama ajax" />
</body>
</html>
<%
sub onload()
dim ajax_comando
ajax_comando = request("ajax_comando")
if(ajax_comando = "1") then ajax_1
end sub
sub ajax_1()
dim v
v = "[""Stefano"",""Carlo"",""Nicola""]"
response.Clear
response.Write(v)
response.End
end sub
%>