Real Time Progress Indicator
Posted
by
jignesh
on Stack Overflow
See other posts from Stack Overflow
or by jignesh
Published on 2012-03-23T03:11:32Z
Indexed on
2012/03/31
17:29 UTC
Read the original article
Hit count: 246
JavaScript
|jQuery
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
© Stack Overflow or respective owner