You are here: irt.org | FAQ | JavaScript | Pointer | Q185 [ previous next ]
Do not use onMouseOver to change the cursor. What you need to do is once the item has been created and given an ID, to then use JavaScript to set the cursor for that item:
<a href="apage.html" id="myLink">go somewhere</a> <img id="myPicture" src="picture.gif" width="16" height="16"> <p id="myText">Some text</p> <span id="mySpan">Some text within a span tag</span> followed by text outside the span tags. <script language="JavaScript"><!-- if (document.all) { document.all("myLink").style.cursor = 'wait'; document.all("myText").style.cursor = 'hand'; document.all("myPicture").style.cursor = 'crosshair'; document.all("mySpan").style.cursor = 'move'; } //--></script>
The following cursors are available:
auto | crosshair | default | hand | move | e-resize | ne-resize | nw-resize | n-resize | se-resize | sw-resize | s-resize | w-resize | text | wait | help