I have one utility in php and want to be executed on pressing button in javascript.
Button in HTML:
<button id ="back">Zoom-Out</button></td>
JS code:
$("#back").click(function() {
exec ("php recordgenerator.php 0"); /*generate sample.json */
$.getJSON('sample.json', function(data) {
options.series = data;
chart = new Highcharts.Chart(options);
});
});
But exec is not working in javascript. How can i execute php scirpt to update the chart?