E
eskwayrd
Hi group,
I'm trying to add a busy indicator to the sorttable.js code available
at:
http://www.kryogenix.org/code/browser/sorttable/
(Actually, my version is modified for my needs, such as maintaining
zebra stripes post-sort, multi-column sorting, keeping rows with
subordinate rows together. But my problem exists even with the original
code).
I've implemented a function to turn change a 'progress' div:
function busyProgress(m) {
if (document.getElementById("progress")) {
var myEl = document.getElementById("progress");
myEl.innerHTML = (m) ? 'Busy, please wait...' : '';
}
}
This works great with something like an Ajax function, but with
sorttable.js, the 'progress' div's contents never change. Note that I'd
use something like document.body.cursor.style = 'wait' as well, but
Firefox won't change the cursor style unless the mouse is moved.
If I insert an alert() right after the innerHTML line, then I see the
div's contents being changed.
If I insert a simple delay (using new Date().getTime, and looping until
the desired time has passed), the div's contents do not change.
This is a concern since a number of the tables I need to present, and
wish to allow in-browser sorting, have a few hundred rows. The sort
will complete, but I have been unable to provide a visual indicator
that the sort is in progress.
Has anyone else attempted to do this and had success?
Thanks for any assistance you can provide.
I'm trying to add a busy indicator to the sorttable.js code available
at:
http://www.kryogenix.org/code/browser/sorttable/
(Actually, my version is modified for my needs, such as maintaining
zebra stripes post-sort, multi-column sorting, keeping rows with
subordinate rows together. But my problem exists even with the original
code).
I've implemented a function to turn change a 'progress' div:
function busyProgress(m) {
if (document.getElementById("progress")) {
var myEl = document.getElementById("progress");
myEl.innerHTML = (m) ? 'Busy, please wait...' : '';
}
}
This works great with something like an Ajax function, but with
sorttable.js, the 'progress' div's contents never change. Note that I'd
use something like document.body.cursor.style = 'wait' as well, but
Firefox won't change the cursor style unless the mouse is moved.
If I insert an alert() right after the innerHTML line, then I see the
div's contents being changed.
If I insert a simple delay (using new Date().getTime, and looping until
the desired time has passed), the div's contents do not change.
This is a concern since a number of the tables I need to present, and
wish to allow in-browser sorting, have a few hundred rows. The sort
will complete, but I have been unable to provide a visual indicator
that the sort is in progress.
Has anyone else attempted to do this and had success?
Thanks for any assistance you can provide.