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

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

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

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

©2018 Martin Webb