English 中文(简体)
• 如何使用同步的JQuery确认方言为 s?
原标题:How to use asynchronous JQuery confirm dialog as synchronous?

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 ?

最佳回答

我也看着这一点,答案是没有的。 参看这一很好的解释:

将 as铁丝·迪亚洛改为nch?

问题回答

暂无回答




相关问题
Asynchronous data loading in Entity-Framework?

Did anyone hear about asynchronous executing of an EF query? I want my items control to be filled right when the form loads and the user should be able to view the list while the rest of the items ...

Does PHP support asynchronous programming?

I m new to PHP. I am familiar with ASP.NET which support asynchronous programming. That is, if one request needs to do some I/O job. It is suggested to program the web page with BeginProcess/...

How to cancel an asynchronous call?

How to cancel an asynchronous call? The .NET APM doesn t seem to support this operation. I have the following loop in my code which spawns multiple threads on the ThreadPool. When I click a button on ...

What can cause select to block in Python?

Here s a snippet of code I m using in a loop: while True: print loop rlist, wlist, xlist = select.select(readers, [], [], TIMEOUT) print selected # do stuff At a certain point, ...

热门标签