0

我已经使用 jquery 实现了一些表单处理,在某些情况下需要更多信息,在这种情况下,我在 fancybox 中打开一个新页面,如下所示:

moreInfoNeeded = checkInfoComplete();
if (moreInfoNeeded) {
    $.fancybox.open({
        href    : 'iframe.html',
        type    : iframe,
        padding : 5
    });

    // We need to pause execution here until fancybox is closed.
}

// Once fancybox has been closed we have all the information so can continue.
$.ajax({
    ...

    success: function(data)
    {
        window.location.replace(data);
    }
});

如何在fancybox 窗口打开时暂停脚本的执行?目前,上面的代码开始打开带有 iframe 的 fancybox 窗口,但重定向使用window.location.replace发生并在此过程中关闭了 fancybox 窗口。

谢谢,

安迪。

4

0 回答 0