This should be a simple question, but I can't find an answer on google. I am trying to figure out how to make ajax run another script if the first is successful.
To put it very simply, let's say I have Script1.js which looks like this:
$.ajax({
// Do something
success: {
// Run Script2.js
}
});
And Script2.js which looks like this:
$.ajax({
// Do something
success: {
// Do something
}
});
Can anyone clue me in on how I would make Script1.js trigger Script2.js to run? Thanks in advance.