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

Q517 How can I set the mouse pointer to an HourGlass after I tab from a text field?

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

Q517 How can I set the mouse pointer to an HourGlass after I tab from a text field?

You can only set the mouse pointer in Internet Explorer 4.

<script language="JavaScript"><!--
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>

You can trap the cursor leaving a text field using the onBlur event handler:

<form>
<input type="text" onBlur="setPointer()">
</form>

Feedback on 'Q517 How can I set the mouse pointer to an HourGlass after I tab from a text field?'


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.