oach
Members-
Content count
2 -
Joined
-
Last visited
About oach
-
Rank
Forum Newbie
-
Been working on this and found some information in the documentation. So this is what my code looks like: var obj_fc = new FusionCharts('<?php echo base_url(); ?>javascript/fusioncharts_v3/Charts/Line.swf', 'fc_1', '940', '200', '0', '0'); obj_fc.setDataURL('xml/fc.xml'); obj_fc.render('ga_largeChart'); // and function processAJAX(url) { var obj_chart = getChartFromId('fc_1'); url += '?nocache=' + new Date().valueOf(); obj_chart.setDataURL(url); } // ajax call new Ajax.Request('ga_getGraph/pageviews', {asynchronous: true, evalScripts: true, evalJS: true, method: 'get', onComplete: function(response) {processAJAX(response.responseText);}}); return false; I know that the url variable has the correct url (alert) and I have checked the xml file, which gets updated BUT the chart does not get updated. No errors on the page either. Any ideas? Thank you, oach
-
Hi All, There is a chart on a page that is created while the page loads via php. This works w/out a problem. I am using prototype attached to specific links on the page that I want to be able to change the chart on the page. I have tried to search the forums but haven't found a ton on the topic and I don't quite understand how to update. Here is some code // this works fine var obj_fs = new FusionCharts('<?php echo base_url(); ?>javascript/fusioncharts_v3/Charts/Line.swf', 'fc_1', '940', '200'); obj_fs.setDataXML('<?php echo $data; ?>'); obj_fs.render('ga_largeChart'); // ajax call new Ajax.Request('../ga_getGraph/pageviews', {asynchronous: true, evalScripts: true, method: 'get', onComplete: function(response) {$('ga_largeChart').update(response.responseText);}}); return false; Response text is similar to the js above (don't know another way of doing it - that's why I am asking the question. Thank you for your time and help, oach