jQuery UI Widgets Forums Grid How do I know when data has been saved

This topic contains 1 reply, has 2 voices, and was last updated by  Dimitar 9 years ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author

  • Arneault

    Hi there

    I want to save the contents of a grid as a csv file on the server. I am using the code below. A php-file saves the contents and returns ‘echo(TRUE)’ when the file has been saved and ‘echo(FALSE)’ when not.

    How can I evaluate (by success or error) or something else, the TRUE of FALSE the php-file send.

    Thanks a lot.

    var exportInfo = $(“#bestandentabel”).jqxGrid(‘exportdata’, ‘csv’);
    var data = “bestandsnaam=” + bestandsnaam + “&exp=” + exportInfo;

    type: “POST”,
    datatype: ‘json’,
    url: ‘sql_bestand_opslaan.php’,
    cache: false,
    data: data,
    success: function (data, status, xhr) {
    alert(‘in maak ‘ + maakbestandOK);
    error: function (jqxhr, textstatus, errorthrown) {
    alert(‘MISLUKT: Bestand niet opgeslagen’);


    Hi Arneault,

    The data argument of the Ajax success callback should contain your server response. For more information, please refer to the jQuery.ajax() documentation page.

    Best Regards,

    jQWidgets team

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.