I am trying to do several things. one I am using google visualization when in a page which is called via an Ajax call, and the javscript function is generated by php.
So i have in the main page initialized my google variables: ///////////////// <script type="text/javascript" src="http://www.google.com/jsapi"></ script> <script language="javascript"> google.load("visualization", "1", {packages:["linechart"]}); google.setOnLoadCallback(loadVisualizations); var g_googleLoaded=0; var g_tablesLoaded=0; </script> ///////////////////// then In the called pages I generate the various javascript functions, //////////////// <script type="text/javascript"> window.drawChart_Precipitation = function () { <create columns> <set data here> var chart = new google.visualization.LineChart (document.getElementById('graph_Precipitation' )); chart.draw(data, {width: 1000, height: 340, legend: 'bottom', title: 'Precipitation'}); } </script> <script type="text/javascript"> window.drawChart_Temperature = function () { <create columns> <set data here> var chart = new google.visualization.LineChart (document.getElementById('graph_Temperature' )); chart.draw(data, {width: 1000, height: 340, legend: 'bottom', title: 'Temperature'}); } </script> //////////////////////////////////////////////// there can be up to 10 of these on some pages. and when the ajax call ends I call a parent function which "load" the various charts ... <script type="text/javascript"> window.LoadGraphs = function () { drawChart_Precipitation() drawChart_Temperture() ... } </script> //////////////////////////////////////////////// here is what is happening. Sometimes the graphs load. Sometimes they don't Sometimes they display the data from the previous call.... is there a way to check that the google library is loaded so that i will load the graphs? is there a way to delete previously sent data so that only the latest data is returned? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Visualization API" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-visualization-api?hl=en -~----------~----~----~----~------~----~------~--~---
