I use a simple JavaScript confirm function that is used by all pages in my Asp.net project and I want to replace it with jQuery confirm dialog. I use Apprise jQuery confirm dialog library. But the asynchronous work of jQuery confirm dialog causes problem. Let me give you some code examples of my project..
www.un.org/spanish/ecosoc 这是我老的 Java印确认职能。
function confirmForOperation(message) {
if (confirm(message) == true)
return true;
else
return false;
}
www.un.org/spanish/ecosoc 这是我新的 as脚石。 j Query确认了方言功能
function confirmForOperation(message) {
apprise(message, { verify : true, animate : true, textYes : Yes , textNo : No },
function (r) {
if (r) {
// User clicked YES..
return true;
}
else {
// User clicked NO..
return false;
}
});
}
www.un.org/spanish/ecosoc 请让我将以下职能作为。
function confirmForOperation(message, callBack) {
apprise(message, { verify : true, animate : true, textYes : Yes , textNo : No },
function (r) {
if (r) {
// User clicked YES..
if ($.isFunction(callback)) {
callback.apply();
}
}
else {
// User clicked NO..
return false;
}
});
}
但是,电话Back机制对我没有发挥作用,因为一个区域(代码) 我使用这一确认语气功能如下:
<asp:Button ID="btnDelete" runat="server" CausesValidation="false" CommandName="Delete"
Text="<%$ Resources:BTNResource, BUTTON_DELETE_LABEL %>" OnClientClick="return confirmForOperation();" />
Any idea ?