I'm using the jQuery impromptu library and not understanding the async nature of it. I've got some code below that I want to redirect after the prompt is run. I don't want the next line of code to execute if my data.redirectPage statement is true.
success: function (data) {
if (data.redirectPage == "hackathonregistration") {
$.prompt("Your code has been accepted and you will now be redirected to the hackathon registration page",
{
submit: function() {
window.location.href = "/Register/hackathon";
}
});
}