Html - Technical Support

Html

Technical Support Forum

Pages:  1Original Forum    Popular Forums    Search

Posted by: chodder

I am working on a site and thought it would be cool to have a cool cursor. So I was searching around and found this. It is cool and I tried it out but cannot get it to work. Any ideas? The site for the cursor doesn't allow you to copy and paste and I think I am messing up with the spacing. So all I need it someone with HTML experience to put it all together in one lump so I can just copy and paste it into my site.

Reply To this Message

Posted by: Larke2000

this is the part of the code that gives you the yellow cross-hair cursor. actually there's lines in there that aren't needed. but i'm not that html savvy so as long as it doesn't give you any errors...

quote:
<HTML>
<HEAD>
<TITLE>DHTML/VML Cross-Hair Scope</TITLE>
<xml:namespace ns="urn:schemas-microsoft-com:vml" prefix="v"/>
<STYLE>
v\:* {behavior:url(#default#VML);}
</STYLE>
</HEAD>

<SCRIPT>
function movescope() {
if (document.all) {
scope.style.left=event.clientX+document.body.scrollLeft-11;
scope.style.top=event.clientY+document.body.scrollTop-11;

scope.style.zIndex=-1;
de=document.elementFromPoint(event.clientX,event.clientY);
scope.style.zIndex=0;
if (de)
if ((de.tagName=="A") || (de.parentElement.tagName=="A")) {
de.style.cursor="crosshair"
de="hlink"
}
else
de=de.id;


else de='other';
switch (de) {
case 'mtext': scope.fillcolor='red';break;
case 'hlink': scope.style.zIndex=-1;scope.fillcolor='#00FF00';break;
default: scope.fillcolor='yellow';
}
}
}
</SCRIPT>

<BODY
id="mbody"
onload="mbody.style.cursor='crosshair';"
onscroll="movescope()"
onmousemove="movescope();">

<vval
id="scope"style="position:absolute;width:18;height:18"
fillcolor='yellow' />

</BODY>
</HTML>
Reply To this Message

Posted by: Advance

IMO, people choose thier cursors, don't choose it for the.

Reply To this Message

Posted by: chodder

Thanks Larke It works

Reply To this Message

Posted by: Larke2000

no problem, chodder. just don't tell optimus.

Reply To this Message

Posted by: chodder



Hopefully since I shot down his Arc he should be too busy with that and not my problems

Reply To this Message

Pages:  1 Free Forums    Chat Forum

Technical Support Forum: Html

Forum Forum Forum