ajaxfileupload jquery.window('open')问题
在ie里$('#progress').window('open')没起作用,在火狐里没压力,希望高手们看看,代码如下:
function ajaxFileUpload(){ajaxfileupload jquery.window
if($('#image').attr("value")!=""){
$.ajaxFileUpload(
{
url:'newsFileUpload.jsp?t='+new Date(), //需要链接到服务器地址
secureuri:false,
fileElementId:'image', //文件选择框的id属性
dataType: 'json', //服务器返回的格式,可以是json
success: function (data, status) //相当于java中try语句块的用法
{
//var json = JSON.parse(data)
if(data.success!=true){
$.messager.alert('注意',"数据处理出错,请重新上传",'warning');
}
},
error: function (data, status, e) //相当于java中catch语句块的用法
{
$.messager.alert('错误',"错误:"+e.description,'error');
}
}
);
$('#progress').window('open');
var flag;
do{
$.ajax({
type:"POST",
async:false,
url:"newsUploadProgress.jsp?t=" +new Date(),
dataType:"json",
cache:false,
timeout:4000,
success:function(data){
//alert(data);
//var json = JSON.parse(data);
flag=data.percentage;
$('#p').progressbar('setValue', flag*100);
$('#message').html(data.msg);
}
});
}while(flag<1)
$('#progress').window('close');
return false;
}else{
$.messager.alert('错误',"新闻列表文件不能为空",'error');
}
}