• Want to receive the latest contracting news and advice straight to your inbox? Sign up to the ContractorUK newsletter here. Every sign up will also be entered into a draw to WIN £100 Amazon vouchers!

No cursor in jscript

xoggoth

More fingers than teeth
Joined
Jul 8, 2005
Messages
17,133
Likes received
4,950
Thanks received
1,184
Location
xoggoth towers
Thought this would be dead easy but darned if can find any solutions on net that aren't complicated, with loads of script, activexs etc. I just want to completely remove the cursor over an image in jscript. "none" doesn't work.

Cheers for brilliant ideas.
 
Last edited: 17:57
Cheers aTw but that was one of the very complicated scripts I had in mind. Seems odd there is no direct method like "none" or null.

Managed to do it with a simple custom cursor that has nothing in it, unless anyone has a more direct method.
 
Last edited: 18:56
CSS:

<style type="text/css">
<!--
.cursor { cursor: none}
-->
</style>

Attach it to the OnClick Event:

OnMouseOver="this.className='cursor';"
 
Last edited: 08:17
Cheers, FiveTimes but that isn't working on mine either.
 
how about using the swfobject ?
 
I got this to work - sort of - in a couple of the modern browsers but it is horrible and not sure how it's working.

FiveTimes solution would work in FF3 but not IE7 so I defined a custom cursor . This didn't work for me in FF3 as I suspect you need to give the full http path to the file - you could make a tiny transparent gif.
Don't know how this will pan out in other browsers - not well would be my guess. Try to make the custom cursor thingy work.

<html>
<head>
<style type="text/css">
.nocursor { cursor: none}
.nocursor { cursor: url(Windows/WEB/ieupdate.ico)}

</style>
</head>
<body>

<img src="xoggoth.jpg" class="nocursor" />


</body>

</html>

Edit: should have used IE conditional comments like

<style type="text/css">
.nocursor { cursor: none}


</style>

<!--[if IE]>
<style type="text/css">
.nocursor { cursor: url(Windows/WEB/ieupdate.ico)}
</style>
<![endif]-->
 
Last edited: 11:16
Is that some poor man's attemt at DRM by any chance, to prevent 'stealing' those images?
If that's the case, good luck.
 
Ta for furher answers. Think the custom cursor is the easiest, works in IE anyway, not tried adapting to others yet.
 

Advertisers

Back
Top