jQuery ProgressBar和IE8
我在AJAX
同步请求中使用jQuery进度条。 Progressbar在FireFox中运行良好,但IE8始终显示100%。jQuery ProgressBar和IE8
这是我的代码:
var selectRows = $('#rowed3').getGridParam('selarrrow');
$.each(selectRows,function (index,id) {
$.ajax({
url:'addSign',
success: function (result) {
$("#progressbar").progressbar('option','value',currPercent);
},
async:false,
data:{
'id':id,
'details':sign
},
type:'post'
});
当我
$("#progressbar").progressbar('option','value',currPercent);
我看到进度条更改其状态之前添加
alert('111')
。
为什么在IE中不起作用?
对不起,但我跳过了一段代码。我认为这很重要。
Internet Explorer是否设置为怪癖模式?因为通常会弄乱进度条。
IE没有显示任何错误或警告。我创建了断点。进度条方法已运行。但它没有改变进度条状态。 – user1053507
我已经运行javascript:alert(document.compatMode)。它显示'CSS1Compact'。我认为这是Standart模式。 – user1053507
检查下面的代码..你必须设置“async:true”...所以,你的代码应该在下面。
var selectRows = $('#rowed3').getGridParam('selarrrow');
$.each(selectRows,function (index,id) {
$.ajax({
url:'addSign',
success: function (result) {
$("#progressbar").progressbar('option','value',currPercent);
},
async:true,
data:{
'id':id,
'details':sign
},
type:'post'
});
退房这一解决方案:Javascript updates UI only when alert() is used in internet explorer with AJAX
与超时的建议制定了非常适合我。
打开IE8s控制台(F12)并在这里发布错误消息 –