Y
Yaron Cohen
Hi,
I would like to ask for your help (I am using only IE5.5).
I have a very big table that I would like to sort.
During the sort I would like the cursor changed to 'wait' state and
back to default state when the sort is over.
The first row of table displays the columns titles when each cell (TD)
contain link to a sort function (sortTable).
<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=0 name="meridCfgTable"
WIDTH=100% id=meridCfgTable >
<TR align="center">
<TD class=MERIDCFGTITLE>
<A CLASS=MERIDCFGTITLE HREF="javascript:sortTable(0,
meridCfgTable);">ID</A></TD>
…
function sortTable(col, tableToSort,stt)
{
document.body.style.cursor = 'wait';
window.setTimeout(function(){sortTableAfterWait(col,
tableToSort);}, 1000);
}
function sortTableAfterWait(col, tableToSort)
{
// The table sorting process
document.body.style.cursor = 'default';
}
The problems are:
1. Sometimes the cursor is not being changed during the sort (even if
I enlarge the delay to 5000 ms).
2. Sometimes the cursor is changed but does not return to the
'default' state unless I move the mouse after the sort is finished.
I.e. the user can't tell when the sort is over without moving the
cursor.
Any solutions?
Thanks,
Yaron
I would like to ask for your help (I am using only IE5.5).
I have a very big table that I would like to sort.
During the sort I would like the cursor changed to 'wait' state and
back to default state when the sort is over.
The first row of table displays the columns titles when each cell (TD)
contain link to a sort function (sortTable).
<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=0 name="meridCfgTable"
WIDTH=100% id=meridCfgTable >
<TR align="center">
<TD class=MERIDCFGTITLE>
<A CLASS=MERIDCFGTITLE HREF="javascript:sortTable(0,
meridCfgTable);">ID</A></TD>
…
function sortTable(col, tableToSort,stt)
{
document.body.style.cursor = 'wait';
window.setTimeout(function(){sortTableAfterWait(col,
tableToSort);}, 1000);
}
function sortTableAfterWait(col, tableToSort)
{
// The table sorting process
document.body.style.cursor = 'default';
}
The problems are:
1. Sometimes the cursor is not being changed during the sort (even if
I enlarge the delay to 5000 ms).
2. Sometimes the cursor is changed but does not return to the
'default' state unless I move the mouse after the sort is finished.
I.e. the user can't tell when the sort is over without moving the
cursor.
Any solutions?
Thanks,
Yaron