T
Tom de Neef
The objective:
1. change cursor to hourglass
2. do extensive calculation (a search in strings)
3. upon completion, change cursor to default
The code I use
document.body.style.cursor = "wait"
for (k=0;k<someCount;k++) { do a lot of searching }
// document.body.style.cursor = "auto"
I commented the last line out to see what happens. The cursor changes to the
hourglass upon completion of the for statement. It is as if it had to wait
for idle time. I have experimented with setTimeout() but to no avail.
Is there a way to force the cursor change to take effect immediately?
Kind regards,
Tom
1. change cursor to hourglass
2. do extensive calculation (a search in strings)
3. upon completion, change cursor to default
The code I use
document.body.style.cursor = "wait"
for (k=0;k<someCount;k++) { do a lot of searching }
// document.body.style.cursor = "auto"
I commented the last line out to see what happens. The cursor changes to the
hourglass upon completion of the for statement. It is as if it had to wait
for idle time. I have experimented with setTimeout() but to no avail.
Is there a way to force the cursor change to take effect immediately?
Kind regards,
Tom