jqueryUI 关闭挂起

使用 jQuryUI 和对话框并在单击确定时在下面调用它挂起。我相信它被正确关闭了吗?这是一个线程问题,其中 UI 位于不同的线程中,我希望它阻止当前线程并在关闭时恢复?如果是这样,如何在 jQueryUI 关闭之前阻止 Javascript 的执行?

<div id="confirm00" class="ui-helper-hidden"
         title="Alert00">
        <p th:text="#{vendorEDI}"></p>
</div>

function confirm00(){
    $("#confirm00").dialog({
        autoOpen: false,modal: true,width: 400,buttons: [
            {
                text: "Ok",icon: "ui-icon-heart",click: function() {
                    $( this ).dialog( "close" );
                }
            }
        ]
    })
    $("#confirm00").dialog('open');
}

为了回答下面的问题,它在下面的按钮点击事件中被调用。目的是阻止通知然后防止违约。

 if ($('#ediFile')[0].files.length === 0) {
        confirm00();
        $("#uploadForm input[name='processed']").val("");
        $("#uploadForm input[name='processedNonce00']").val("");
        $('#uploadForm').submit(function (event) {
            event.preventDefault();
        });
        return;

对不起,下面是点击按钮时调用的整个函数。对话框出现、清除但浏览器被冻结。

function noEDI(choice) {
    var processType=$("#uploadForm select[name='processType']").val();
    $("#showReports01 input[name='processType']").val(processType);
    $("#showReports02 input[name='processType']").val(processType);
    if ($('#ediFile')[0].files.length === 0) {
        confirm00();
        $("#uploadForm input[name='processed']").val("");
        $("#uploadForm input[name='processedNonce00']").val("");
        $('#uploadForm').submit(function (event) {
            event.preventDefault();
        });
        return;
    } else if (isEdiXML() == "false") {
        confirm00();
        $("#uploadForm input[name='processed']").val("");
        $("#uploadForm input[name='processedNonce00']").val("");
        $('#uploadForm').submit(function (event) {
            event.preventDefault();
        });
        return;
    } else {
        if ($('#creditmemos').length > 0)
            $('#creditmemos').remove();
        if ($('#reorders').length > 0)
            $('#reorders').remove();
        $("#uploadForm input[name='subscriber_s']").val(subscriber);
        var shortName = $("#subscriberFrm select[name='shortName']").val();
        $("#uploadForm input[name='shortName']").val(shortName);
        $("#btnExtracts input[name=ediOriginalFileName]").val(originalFileName);
        uploadDialog();  //modal jqueryUI.
        $('#uploadForm').submit();
    }
}
happylady0001a 回答:jqueryUI 关闭挂起

暂时没有好的解决方案,如果你有好的解决方案,请发邮件至:iooj@foxmail.com
本文链接:https://www.f2er.com/63011.html

大家都在问