I am completely new to Javascript/jquery world and need some help. Right now, I am writing one html page where I have to make 5 different Ajax calls to get the data to plot grap
You can't do that using async: false
- the code executes synchronously, as you already know (i.e. an operation won't start until the previous one has finished).
You will want to set async: true
(or just omit it - by default it's true). Then define a callback function for each AJAX call. Inside each callback, add the received data to an array. Then, check whether all the data has been loaded (arrayOfJsonObjects.length == 5
). If it has, call a function to do whatever you want with the data.