Important : Absolutely no jQuery allowed
I have developed four distinct functions and I am looking to execute them sequentially, one after the other in JavaScript without using jQuery. I have scoured the internet for a solution but unfortunately have not found a satisfactory answer. Here is an overview of what I have accomplished so far:
function func1() {
noAjaxCall.click();
return true;
}
function func2() {
ajaxCall.click(); <--------- making an AJAX request
return true;
}
function func3() {
noAjaxCall.click();
return true;
}
function func4() {
//any code can be inserted here
}
if(func1())
if(func2())
if(func3())
func4();
The issue that I am facing is that func3
does not get called. Can someone help me understand why this occurs and suggest a potential workaround?
Thank you!