i in .when $ keine Antwort nach Aufruf Ajax-Methode hat:keine Antwort von Ajax in, wenn Methode
$.when(tht.ajax.getUserDrp()).done(function (data) {
if(data) console.log('hava data')
else console.log('no data')
});
getUserDrp Funktion:
getUserDrp: function(){
$.ajax({
url: "../account/getLevel" ,
type: "POST",
contentType: "application/json; charset=utf-8",
success: function (data) {
// do somthing
}
});
}
als Ergebnis druckt immer 'Keine Daten' in Konsole, warum?
was ist der Datenwert in Ihrer Erfolgsfunktion? –