if(jQuery("#form_fill_hours").validationEngine('validate')){
alertify.confirm("Are you sure you want to submit this exam form to your teacher?", function (e) {
if (e) {
alertify.set({ delay: 10000 });
alertify.success("Your exam form has been submitted");
$.blockUI.defaults.message = "<h1 class='block_msg'>Please Wait...</h1>";
$.post( SITE_URL+"fill/save/saveformexam?type=1",$("#form_fill_hours").serialize(), function( data ) {
window.location.href="<?php echo EXAM_URL."exam/weekly/index?week=".$_GET['week'] ?>";
});
} else {
alertify.error("Your exam form is not submitted");
}
});
return false;
}else{
return false;
}
alertify を使用10
して、成功メッセージの秒遅延を設定しましたが、機能していませんか? ユーザーに成功アラートを表示してから、同じページにリダイレクトするだけです。
使用してみdelay
ましたが、動作しませんでした:
alertify.success("Your exam form has been submitted");//show alert to user
delay(100);//wait for 10 secs and then post form data
$.post( SITE_URL+"fill/save/saveformexam?type=1",$("#form_fill_hours").serialize(), function( data ) {
window.location.href="<?php echo EXAM_URL."exam/weekly/index?week=".$_GET['week'] ?>";
});
ユーザーがそれを見て、フォームの詳細をコントローラーアクションに投稿できるように、成功メッセージに遅延を設定するにはどうすればよいですか?