Home Articles FAQs XREF Games Software Instant Books BBS About FOLDOC RFCs Feedback Sitemap
irt.Org
#

Q426 How can I change the mouse pointer to an hourGlass prior to long running scripts, then reset after the script complete?

You are here: irt.org | FAQ | JavaScript | Pointer | Q426 [ previous next ]

This can only be achieved in Internet Explorer 4. Before running the long process, execute the setPointer(), function, when the process has completed run the resetPointer() function:

<script language="JavaScript"> function doLongProcess() { for( i = 1; i < 1000; i++) for( j = 1; j < 1000; j++); resetPointer(); } function doTime() { setPointer(); setTimeout('doLongProcess()',1); } function setPointer() { if (document.all) for (var i=0;i < document.all.length; i++) document.all(i).style.cursor = 'wait'; } function resetPointer() { if (document.all) for (var i=0;i < document.all.length; i++) document.all(i).style.cursor = 'default'; } //--></script>

Feedback on 'Q426 How can I change the mouse pointer to an hourGlass prior to long running scripts, then reset after the script complete?'

©2018 Martin Webb