Real Time Progress Indicator
- by jignesh
I am trying to get the real time progress indicator.
In the code snippet below,i am trying to set the width of DIV on the basis of the Number of Items retrieve from the Web Service Call Back Function.
for (i = 0; i < data.length; i++) {
table += '<tr>';
table += '<td>' + data[i].ItemId + '</td>';
table += '<td></td>';
table += '<td>' + data[i].Name + '</td>';
table += '<td>' + data[i].Unit + '</td>';
table += '<td><input type=text value=' + data[i].Quantity + '></td>';
table += '<td>' + data[i].Brands + '</td>';
table += '<td><img border=0 src=../images/Delete_icon.gif></td>';
table += '</tr>';
$('#divProgressIndicator').width((100 * (i / data.length)) + '%');
}
As shown in the code above,after the for loop is executed i only see the divProgressIndicator filled with the background color and I am not able to see the progress.
Can I achieve this in a for loop or i need to use some thing else.
Regards