Hi, this is my index.php
<html>
<head>
<meta charset="UTF-8">
<title>Prova</title>
<!--Load the AJAX API-->
<script type="text/javascript"
src="https://www.google.com/jsapi"></script>
<script type="text/javascript"
src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script type="text/javascript">
// Load the Visualization API and the piechart package.
google.load('visualization', '1', {'packages':['corechart']});
// Set a callback to run when the Google Visualization API is loaded.
google.setOnLoadCallback(drawChart);
function drawChart(num) {
var json = $.ajax({
url: "prova.php",
data: "q="+num,
dataType:"json",
async: false
}).responseText;
// Create our data table out of JSON data loaded from server.
var datachart = new google.visualization.DataTable(json);
var options = {
is3D: 'true',
width: 800,
height: 600
};
var chart = new
google.visualization.PieChart(document.getElementById('chart_div'));
chart.draw(datachart,options);}
</script>
<form>
<select name="Parametr" onchange="drawChart(this.value)">
<option value="">Select a Parameter:</option>
<option value="Param1">Parametr1</option>
<option value="Param2">Parametr2</option>
<option value="Param3">Parametr3</option>
</select>
<select name="Sistem" >
<option value="">Select a Component:</option>
<option value="comp1">Component1</option>
<option value="comp2">Component2</option>
<option value="comp3">Component3</option>
</select>
</form>
</head>
<body>
<div id="chart_div" style="width: 500px; height: 500px;"></div>
</body>
</html>
Now my question is how do I pass two values to the function drawChart???
--
You received this message because you are subscribed to the Google Groups
"Google Chart API" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-chart-api.
For more options, visit https://groups.google.com/d/optout.