Boomerific Report post Posted April 30, 2009 We have a Gantt chart showing the jobs lined up on a resource that is fed by a external XML document. The problem is the first time that the chart requests the XML document it does not ask for the complete URL. It is supposed to request something similar to "http://mrc:8012/mrcjava/servlet/MRCCKS.I00571s?slnk=1&DTDEPT=DFT04", but only asks for "http://mrc:8012/mrcjava/servlet/MRCCKS.I00571s?slnk=1" on the initial render. If you tell it to setDataURL() again with the full path again right away it will correctly request the URL. Here is my code showing that one half of a second after the chart renders the first time you can tell it to update the URL again it will have retrieved the correct XML since it requested the correct URL. I verified this was the problem with Firebug in FireFox. -- in the head -- -script type="text/javascript"- var objChart; var strDataURL = "http://mrc:8012/mrcjava/servlet/MRCCKS.I00571s?slnk=1&DTDEPT=DFT04"); function refreshPage() { objChart.setDataURL(strDataURL); } -/script- -- In the Body -- -div id="chart1div"--/div- -script type="text/javascript"- objChart = new FusionCharts("../FusionCharts/Gantt.swf", "chart1Id", "100%", "100%", "0", "1"); objChart.setTransparent(true); objChart.setDataURL(strDataURL); objChart.render("chart1div"); setTimeout('refreshPage()', 500); /* Refresh timer. 60000 milliseconds per minute */ -/script- Share this post Link to post Share on other sites
FusionCharts Support Report post Posted May 4, 2009 Hi, Please escape the URL: escape("http://mrc:8012/mrcjava/servlet/MRCCKS.I00571s?slnk=1&DTDEPT=DFT04"); Share this post Link to post Share on other sites
Boomerific Report post Posted May 4, 2009 Wonderful that worked. If only I had thought to do that ... Share this post Link to post Share on other sites
Guest Basundhara Ghosal Report post Posted November 16, 2009 Hi, You are welcome. Happy FusionCharting. Share this post Link to post Share on other sites