Home Articles FAQs XREF Games Software Instant Books About Feedback Search Site-Map
irt.org logo

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

irt.org | Knowledge Base | JavaScript | Pointer | Q426 [ previous next ]

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

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?'


Provide feedback ...
AddThis Social Bookmark Button

Provide feedback ... AddThis Social Bookmark Button


Last Updated: 6th July 2009. Maintained by: Martin Webb and Michel Plungjan
irt.org liability, trademark, document use, privacy statement and software licensing rules apply.
Copyright © 1996-2009 irt.org, All Rights Reserved.