I used the $.get to get the value generated in test2.php, when I do an alert(data) I get the exact value I want, but I don't know what to do to stock the value obtained in the variable y :
var series = this.series[0];
setInterval(function() {
$.get('test2.php', function(data) {
alert(data);
});
var y = data; // NOT WORKING !
var x = (new Date()).getTime();
series.addPoint([x, y], true, true);
}, 1000);
I'm new to JavaScript, so thanks in advance..!