ajax不工作和chrome但在IE中工作正常

时间:2016-12-17 00:20:11

标签: javascript ajax google-chrome internet-explorer prototypejs

需要帮助!! ..似乎new Ajax.Request基于调试无法识别.... 在线尝试了一些建议,但没有工作.. cache=false等... 谢谢!

if (init) {
    init = false;
    param = "init=" + true;
    param = encodeURI(param.replace(/^\s+|\s+$/g, ''));


    setLastRequestTimestamp(); //ryan's trial
    new Ajax.Request("downstocking_apply_async.do", {
        onSuccess: function(transport) {
            if (!isHangingRequest()) {
                alert("initUpdateScanArea");
                initUpdateScanArea(transport.responseText);
                setLastRequestTimestamp();
            } else {
                if (signalOnScan() == 1) {
                    alert("<fmt:message key="
                        message.signal_scan_off " bundle="
                        $ {
                            application
                        }
                        "/>");
                    return;
                }
                alert("<fmt:message key="
                    message.signal_downstock_suspend " bundle="
                    $ {
                        application
                    }
                    "/>");
                doSuspend();

            }
        },
        onFailure: function(transport) {
            if (!isHangingRequest()) {
                document.downstockingForm.action = "downstocking_apply_async.do?" + param;
                if (signalOnScan() == 1) {
                    alert("<fmt:message key="
                        message.signal_scan_off "    bundle="
                        $ {
                            application
                        }
                        "/>");
                    return;
                }
                setLastRequestTimestamp();
                document.downstockingForm.submit();
            } else {
                if (signalOnScan() == 1) {
                    alert("message");
                    return;
                }
                alert("message");
                doSuspend();

            }
        },
        parameters: param,
        asynchronous: "true"
    });
}

1 个答案:

答案 0 :(得分:0)

找到解决方案......导入的自定义js库正在与原型js产生混淆 删除了自定义库,它现在正常工作......谢谢!