customizing the Mouse Pointer 
Author Message
 customizing the Mouse Pointer

Hello,

 is it possible to customizing the Mouse Pointer from a jscript?

 Thanks

 Laurent



Sun, 08 Sep 2002 03:00:00 GMT  
 customizing the Mouse Pointer

Quote:
> Hello,

>  is it possible to customizing the Mouse Pointer from a jscript?

Yes in IE4 and above - no in Netscape 4.x

Try this:

<HTML>
<HEAD>
<SCRIPT>

function setCursor(pstrCursor)
/*
Sets the cursor to the value of pstrCursor for the document body
Doesn't seem to work in Netscape

The following cursors are defined:

auto  Browser determines the cursor to display based on the current context.
crosshair Simple cross hair.
default  Platform-dependent default cursor. Usually an arrow.
hand  Hand.
move  Something is to be moved.
*-resize Edge is to be moved (e-resize, ne-resize, nw-resize, n-resize,
se-resize, sw-resize, s-resize, w-resize)
text  Editable text. Usually an I-bar.
wait  Usually a watch or hourglass.
*/
{

document.body.style.cursor=pstrCursor;

Quote:
}

</SCRIPT>

</HEAD>

<BODY>

<FORM>
 <input type=button onclick="setCursor('crosshair')" id=cmdCrosshair
name=cmdCrosshair value="Crosshair"><br>
 <input type=button onclick="setCursor('hand')" id=cmdHand name=cmdHand
value="Hand (links)"><br>
 <input type=button onclick="setCursor('move')" id=cmdMove name=cmdMove
value="Move"><br>
 <input type=button onclick="setCursor('e-resize')" id=cmdResize
name=cmdResize value="Resize (east)"><br>
 <input type=button onclick="setCursor('text')" id=cmdText name=cmdText
value="Text"><br>
 <input type=button onclick="setCursor('wait')" id=cmdHourglass
name=cmdHourglass value="Hourglass"><br>
 <input type=button onclick="setCursor('auto')" id=cmdReset name=cmdReset
value="Reset cursor">
</FORM>

</BODY>

</HTML>



Sun, 08 Sep 2002 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Need Help with mouse pointer

2. Need HELP to changing mouse pointer

3. Mouse Pointer

4. Set the x-coordinate of mouse pointer

5. Change mouse pointer?

6. Change mouse cursor to from pointer to hand

7. mouse-pointer

8. Custom Mouse Pointer

9. Mouse pointer

10. Change mouse pointer to an hourglass?

11. how do you set the Mouse pointer?

12. Mouse Pointer

 

 
Powered by phpBB® Forum Software