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.
Arneault
var exportInfo = $(“#bestandentabel”).jqxGrid(‘exportdata’, ‘csv’);
var data = “bestandsnaam=” + bestandsnaam + “&exp=” + exportInfo;
$.ajax({
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’);
},
});