Reputation: 85
This is an extremely basic question..
I've discovered that I need to use MSXML2.ServerXMLHTTP to perform a GET server-side and need to make the call between <% %>. I believe the only way to return information to the client is to use Response.Write
If I Response.Write a block of JSON, how do I "receive" it client side and process it? Sorry for the dense question, I'm just used to ASP.NET!
Upvotes: 0
Views: 105
Reputation: 16950
You can write into a client side script block to use.
<%
'Make request
'Get response, assign a variable ( strResponse )
'e.g
strResponse = "{""key"":""value""}"
%>
<script type="text/javascript">
var JSONOBJ = <%=strResponse%> // an object created could be used on client-side
alert(JSONOBJ.key);
</script>
Upvotes: 1