0
jQuery impromptu 라이브러리를 사용 중이며 비동기 성격을 이해하지 못합니다. 프롬프트가 실행 된 후 리디렉션하려는 코드가 있습니다. 내 data.redirectPage 문이 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";
}
});
}