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'] ?>";
});
我如何在成功消息中设置一些延迟,以便用户可以看到它,然后才将表单详细信息发布到控制器操作?