razborka Report post Posted April 23, 2008 Hi, I got a problem using Ajax: statistieken.php is the page in which I call the Ajax function. grafieken.php is the page the Ajax function sends the variable to and this page's supposed to be printed in the divgraf DIV on the page statistieken.php. But I only get the word "Chart.". I am new to Ajax, but the script works fine on other page. Can someone please help me? PHP-Ajax-problem.zip Share this post Link to post Share on other sites
FusionCharts Support Report post Posted April 23, 2008 Hi, Could you please use renderChartHTML() instead of renderChart() in the page :grafieken.php or whereever renderChart() is present? NOTE : This is beacuse when you use renderChart() it returns HTML as well as JavaScript both combine to render the chart. Your ajac responseText contain both. But when you use ajax to set this to your "divgraf" (document.getElementById("divgraf").innerHTML=xmlHttp.responseText ) the JavaScript does not run/execute - Because a) JavaScript injected by JavaScript wont execute and a) AJAX functions through JavaScript. Hence, we need to use something which is JavaScript less. Here come the renderChartHTML() function handy which renderd only HTML elements that renders the chart. Share this post Link to post Share on other sites
razborka Report post Posted April 23, 2008 Thanks a lot, it works fine now Share this post Link to post Share on other sites