如何将ajax的响应返回给被调用的函数?它总是返回undefined

时间:2013-12-07 08:06:22

标签: javascript jquery ajax

$.ajax({
    type : "POST",
    url:"<?php echo TESTMINE_APP_URL; ?>/ajax/export-details",
    data:'paginationHash='+paginationHash+'&exportType='+exportType+'&userId='+userId,
    dataType: "html",
    success: function(requestId){
        var popup = window.open("sample1.php","exportWindow");
        popup.document.write('<html><body>Status: <span id="status">Please wait...</span></body></html>');
        setInterval(function(){
            var status = checkStatusOfRequest(requestId);
            alert(status);
            popup.document.getElementById('status').innerHTML = status;
        }, 9000)
    }
});

0 个答案:

没有答案