score:2

Accepted answer

If you want to post data to your server you can use the jquery post method :

drop: function() {
    $('#drop').html(
    'In <b>' + this.series.name + '</b>, <b>' +
    this.category + '</b> was set to <b>' + 
    Highcharts.numberFormat(this.y, 2) + '</b>'
    );
    $.post("updateFile.php", { ypos: this.y , xpos: this.x} );  // like this
}`

UPDATE:

After, you just have to update your file in the updateFile.php page. You can access your data with PHP like this $_POST['ypos'] or $_POST['xpos']

For example if you want to write the new positions in an CSV file :

<?php
// 1 : open the file
$myfile = fopen('myfile.csv', 'a+');

// 2 : write at the end of the file
fputs($myfile, $_POST['ypos'] . "; " . $_POST['xpos'] . "\n");

// 3 : when we have done, we close the file
fclose($myfile);
?>

Related Articles