2011-11-18 70 views
3

我在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中不起作用?

對不起,但我跳過了一段代碼。我認爲這很重要。

+2

打開IE8s控制檯(F12)並在這裏發佈錯誤消息 –

回答

1

Internet Explorer是否設置爲怪癖模式?因爲通常會弄亂進度條。

+0

IE沒有顯示任何錯誤或警告。我創建了斷點。進度條方法已運行。但它沒有改變進度條狀態。 – user1053507

+0

我已經運行javascript:alert(document.compatMode)。它顯示'CSS1Compact'。我認爲這是Standart模式。 – user1053507

0

檢查下面的代碼..你必須設置「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' 
});