- // upload text to file
- $.ajax({
- method: 'POST',
- dataType: 'json',
- processData: false,
- contentType: false,
- url: 'assetpath/easydbkeysetup.php',
- data: textData // this is FormData()
- })
- .done (function(response) {
- var rout = response.text; // THROWING ERROR: NULL IS NOT AN OBJECT
- console.log('Response-Done: ' + rout);
- $('#easydbcredentialswrapper_%id% .success-message p').append('<span>' + rout + '</span>');
- })
- .fail (function(response) {
- var rout = response.text;
- $('#easydbcredentialswrapper_%id% .error-message p').append('<span>' + rout + '</span>');
- });
Why can't I get the response.text ?