提交提示后调用另一个提示
Call another prompt after submit prompt
我想在提交答案后调用另一个提示,但是 LoadNewRecord
函数中的 .prompt
没有显示。有什么想法吗?
提交提示:
$.prompt("Opening Recap with ID " + Recap[0][0].id + ".<br> Note: Any changes on Recap " + header.find("#recap_id").val() + " will not be saved.", {
title: "WARNING",
buttons: {
"Continue": true,
"Cancel": false
},
submit: function(e, v, m, f) {
var Recap_status;
if (v === true) {
Recap_status = Recap[0][0].status;
LoadNewRecord(Recap, header);
return $("#error_history").hide();
} else {
return selectedRecap();
}
}
});
LoadNewRecord函数提示:
if (period_lock >= getDateInput(Recap[0][0].recap_date) && Recap_status < 20) {
setTimeout((function() {
$.prompt("You are not allowed to make any changes for all documents before " + period_lock + ". Please contact your administrator for further information");
}), 100);
}
注意:
我在读完这个 question 后使用 setTimeout
,但仍然不起作用..
如果我删除 LoadNewRecode
中的 $.prompt
或将其更改为 alert
一切正常。
我想在提交答案后调用另一个提示,但是 LoadNewRecord
函数中的 .prompt
没有显示。有什么想法吗?
提交提示:
$.prompt("Opening Recap with ID " + Recap[0][0].id + ".<br> Note: Any changes on Recap " + header.find("#recap_id").val() + " will not be saved.", {
title: "WARNING",
buttons: {
"Continue": true,
"Cancel": false
},
submit: function(e, v, m, f) {
var Recap_status;
if (v === true) {
Recap_status = Recap[0][0].status;
LoadNewRecord(Recap, header);
return $("#error_history").hide();
} else {
return selectedRecap();
}
}
});
LoadNewRecord函数提示:
if (period_lock >= getDateInput(Recap[0][0].recap_date) && Recap_status < 20) {
setTimeout((function() {
$.prompt("You are not allowed to make any changes for all documents before " + period_lock + ". Please contact your administrator for further information");
}), 100);
}
注意:
我在读完这个 question 后使用 setTimeout
,但仍然不起作用..
如果我删除 LoadNewRecode
中的 $.prompt
或将其更改为 alert
一切正常。