I am currently trying to draw some dynamically loaded graphs using google's visualization tools.
I want to pull the data from an sql database. I have a php script (getnumber.php) that is capable of doing so.
I am trying to use this php script within my javascript that draws the graphs.
<html>
<head>
<!--Load the AJAX API-->
<script type="text/javascript" src="https://www.google.com/jsapi"></script>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript">
function drawChart(Z)
{
tmpdata = new google.visualization.DataTable();
datalist.push(tmpdata);
datalist[Z].addColumn('string', 'Complete');
datalist[Z].addRows([['Finished', $.ajax({url:"getnumber.php"})], ['Incomplete', 10]]);
.
.
.
}
window.setInterval("drawChart()", 1000);
</script>
I realise that this use of $.ajax is completely wrong but I'm stumped!