How can I make synchronous ajax requests in EXT JS?
For example, given this code:
test1();
ajaxRequest(); //Ajax Request
test2();
The test2 function is executed without even finishing the execution of ajaxRequest()
, which has an Ext.Ajax.request
call .
How can I make text2()
execute only after the ajaxRequest()
function has been executed?
I understand that one way of doing it is to call the test2
function in a callback, but I have some dependencies and a lot of code that has to be executed after the ajax request, in a synchronous manner. Can you please help me with the best solution?