ASE Home Page Products Download Purchase Support About ASE
ChartDirector General
Forum HomeForum Home   SearchSearch

Message ListMessage List     Post MessagePost Message

  ASP Classic and AJAX
Posted by Mike on Apr-11-2012 04:31
I want to use AJAX xmlhttp to pass a variable to a chart page:
example:xmlhttp.open("GET","threedpie_oh.asp?u="+stru,true); and have the chart return then image with the updated data.

Mike

  Re: ASP Classic and AJAX
Posted by Peter Kwan on Apr-12-2012 00:32
Hi Mike,

You can freely pass variable to a chart page. However, note that XML supports only XML (or text). It does not support images. It only supports <IMG> tags that reference  images, not the images themselves. For example, you cannot even load a static image using XML (eg. xmlhttp.open("GET","aaa.jpg",true)).

If you must use xmlhttp, your ASP script should return an <IMG> tag instead. The SRC attribute of the <IMG> tag should contain the result of "threedpie_oh.asp?u="+stru. But if the purpose of the ASP script is just to return an <IMG> tag that references another script "threedpie_oh.asp", I think you should not need to use xmlhttp at all. You can just use Javascript to insert an <IMG> tag with the appropriate SRC attribute in your web page.

Hope this can help.

Regards
Peter Kwan