skip to Main Content

ajax function is not working in my JavaScript function function skip the ajax – Jquery ajax

return without executing the ajax function function weekData(){ var weekCount={}; $.ajax({ url:"http://localhost:8080/getWeeeks", headers: { 'Content-Type': 'application/x-www-form-urlencoded' }, type:"GET", dataType:"json", data:{}, success:function(data){ for (var i = 0; i < data.length; i++) { weekCount[i]=data[i]; } debugger return weekCount; }, }); return weekCount…

VIEW QUESTION

Jquery ajax – Response always whole ajax-packet

I get always the whole ajax-packet instead of simple response (true/false) as return of this function (responseJSON.success/responseText.success). Otherwise, the browser sends me an error or fault result with described content function isUnique(inputObject) { let type = $(inputObject).attr('id'); let res =…

VIEW QUESTION
Back To Top
Search