I am trying to implement a chart using the POST method; there is too
much data in my application to fit in the GET method approach (2k char
limit).

I have a page which calls an ASP page to get the data (the available
server only allows ASP). The ASP code is just a javascript, which is
intended to do the POST call for the chart, then send the data (a png
image?) back.

The page code is just
<img src="myAspPage.asp" />

When it runs, it gets an error

500 ACP Active Server page error:
?PNG
(little arrow here)

It looks to me like the Google xtml request is correctly returning a
png file, perhaps in binary format? I don't know what to do with it -
apparently the write of responseText is not correct.

How should I return the POST data to the original page?

the myAspPage.asp code is below:

<%@LANGUAGE="JAVASCRIPT" %>
<script language="javascript" type="text/javascript" runat="server" >

var myURL = 'https://chart.googleapis.com/chart' ;
var params = "chid=12345&cht=lc&chs=500x300&chds0,100000&chd=t:
10,11,12,13,14,15";

// Create the xml object
var http = new ActiveXObject("Microsoft.XMLHTTP");
// Conect to specified URL
http.open("POST", myURL, false);

//Send the proper header information along with the request
http.setRequestHeader("Content-type", "application/x-www-form-
urlencoded");
http.setRequestHeader("Content-length", params.length);
http.setRequestHeader("Connection", "close");

http.send(params);
Response.Clear();
Response.ContentType = "image/png";
Response.write (http.responseText );


</script>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Chart API" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-chart-api?hl=en.

Reply via email to