Ciao a tutti
Ho questo script:
perche in alert mi da sempre undefined?codice:function result(){ let myPromise = new Promise(function(resolve, rejiect) { resolve(xajax(formdata, "/script/playlist.php")); }); myPromise.then( function(value) { alert(value); }, function(error) { alert(error); }, ); } function xajax(formdata, url) { $.ajax({ url: url, data: formdata, method: "POST", contentType: false, processData: false, success: function(response) { return response; }, error: function(response) { return response; } }); }

Rispondi quotando


