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

Message ListMessage List     Post MessagePost Message

  WebChartViewer and URL for partialUpdate
Posted by Dan Hayes on Apr-11-2013 21:05
How is the URL determined for AJAX callback when using WebChartViewer/JsChartViewer for a partialUpdate?  I am using the python edition of ChartDirector 5.1.  Is it determine the URL from the setImageURL method when setting the image for the WebChartViewer?

Thanks,

Dan

  Re: WebChartViewer and URL for partialUpdate
Posted by Peter Kwan on Apr-12-2013 01:40
Hi Dan,

In partial update, the URL is the current URL of the web page, which is obtained from the environmental variable SCRIPT_NAME and QUERY_STRING. The SCRIPT_NAME and QUERY_STRING are standard CGI variables. As far as I know, both Apache and IIS (and other web servers I know of) support these variables. See:

http://en.wikipedia.org/wiki/Common_Gateway_Interface

The idea is that if the charting script is executed because the browser access a certain URL, then using the same URL should cause the charting script to be executed again. The charting script can then update the chart. The SCRIPT_NAME and QUERY_STRING is used to determine which URL the browser is currently using.

The URL in the setImageURL is only used as the URL for the image. In many case, the image URL is not related to the URL of the script. For example, the script may be in a "cgi-bin" subdirectory, while the image can be a temporary image file in a normal web document directory. So the image URL may not be suitable to be used to "callback" the original script.

Regards
Peter Kwan