I use php with open flash chart. I now have issue loading multiple charts in the javascript code, here is my code
// click event function
$( "tr.properties" ).click(function() {
// getting selected row in table
var selected_row = $(this).children().eq(0).text();
// binding function
function get_data_1()
{
alert( 'reading data of data_1' );
alert(JSON.stringify(data_1));
return JSON.stringify(data_1);
}
var data_1 = <?php echo getJSONObject($param1, $param2); ?>;
functionget_data_2(){alert('reading data of data_2');alert(JSON.stringify(data_2));returnJSON.stringify(data_2);}vardata_2=<?phpechogetJSONObject($param1,$param2);?>;// draw the two chartsswfobject.embedSWF("open-flash-chart.swf","data-1","600","300","9.0.0","expressInstall.swf",{"get-data":"get_data_1"});swfobject.embedSWF("open-flash-chart.swf","data-2","600","300","9.0.0","expressInstall.swf",{"get-data":"get_data_2"});});
The problem is that the returned JSON object is not loaded at all. Is there a way to solve this problem?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I use php with open flash chart. I now have issue loading multiple charts in the javascript code, here is my code
// click event function
$( "tr.properties" ).click(function() {
// getting selected row in table
var selected_row = $(this).children().eq(0).text();
// binding function
function get_data_1()
{
alert( 'reading data of data_1' );
alert(JSON.stringify(data_1));
return JSON.stringify(data_1);
}
var data_1 = <?php echo getJSONObject($param1, $param2); ?>;
The problem is that the returned JSON object is not loaded at all. Is there a way to solve this problem?