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
Back To Top
Search