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>