Hi all.
I want a progress dialog window to be shown while several ajax call are being processed. So I have following code:
<!-- progress window to show inscription progress -->
<div id="new_inscripcion-progresswindow" class="easyui-window"
data-options="title:'Processing...',width:450,modal:true,collapsable:false,minimizable:false,maximizable:false,closable:false,closed:true">
<p id="new_inscripcion-progresslabel" style="text-align:center">Inscribiendo a:</p>
<div id="new_inscripcion-progressbar" class="easyui-progressbar" style="width:300px;text-align:center;" data-options="value:0"></div>
</div>
....
function insertInscriptions(dg) {
....
var pwindow=$('#new_inscripcion-progresswindow');
var selectedRows= dg.datagrid('getSelections'); // take selected rows from provided datagrid
var count=1;
var size=selectedRows.length;
pwindow.window('open');
$.each(selectedRows, function(index,row) {
$('#new_inscripcion-progresslabel').text("Inscribiendo a: "+row.Nombre);
$('#new_inscripcion-progressbar').progressbar('setValue',(count*(100/size)).toFixed(2));
$.ajax({
async: false, // NOTICE async set to false to ensure each() returns after last ajax call completed
cache: false,
timeout: 10000, // 10 seconds
type:'GET',
url:"/agility/server/database/inscripcionFunctions.php",
dataType:'json',
data: {
.....
}
});
count++;
});
pwindow.window('close');
....
}
This code works fine in firefox: window is displayed, and progressbar shows progress on each ajax sync call; and when last ajax call is performed, window is closed
But when running in Google Chrome, window does not appear, ajax calls are performed but no window nor progress shown
What am I doing wrong?
Thanks in advance