dwr callback 文件下载框被拦截

function exportList(txtOrExcel){

dwr.engine.setAsync(false);

ClientGroupMgmt.exportUsers(listId_exp, function(fileName) {

window.open("<%=request.getContextPath()%>/common/ftpdownloadByFileName.jsf?fileName="+fileName);

});

dwr.engine.setAsync(true);

之前以为说前后加上dwr.engine.setAsync(...);就可以下载了,我自己的机器小数据量的有试过可以。
现在在别人的机器上,一用到dwr.engine.setAsync(false); 这句,浏览器都卡住了,甚至死机...

请问怎么处理?谢谢


[code="java"]
function exportList(txtOrExcel){

dwr.engine.setAsync(false);
var file;
ClientGroupMgmt.exportUsers(listId_exp, function(fileName) {

file = fileName;

});
window.open("<%=request.getContextPath()%>/common/ftpdownloadByFileName.jsf?fileName="+file);

dwr.engine.setAsync(true);
}
[/code]
因为在回调函数里触发相当于服务器触发,会被浏览器认为是恶意的所以被拦截。

试试类似这样的写法:
downloadTemple:function(type){
if (window != top) {
top.location.href = 'DownloadSvt?dlType='+type;
} else {
location.href = 'DownloadSvt?dlType='+type;
}
},
如果还是有问题, 建议下载不要再dwr callback方法中做.