Question: how to call an ajax request inside a function ? I have the following ajax request: $ ( document ) . ready ( function (

"how to call an ajax request inside a function ?
I have the following ajax request:
$(document).ready(function (){
$.ajax(
url: '@url.Action(""methodexample"",""controller"")',
type: ""POST"",
data: {
},
success: function (data){
FUNCTION2(data);
XP10
}
);
});
});
I have the following function below the ajax:
function FUNCTION2(){
}
I was wondering if there was a way to call the ajax request inside FUNCTION2()"

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!