izonmi89
08-21-2003, 08:00 PM
I copied the code for cursors exactly from the cursor page. Now, I can't click on any links on my page. Why is this and what can I do to fix it?
|
View Full Version : cursor code izonmi89 08-21-2003, 08:00 PM I copied the code for cursors exactly from the cursor page. Now, I can't click on any links on my page. Why is this and what can I do to fix it? SSPrincess 08-21-2003, 08:24 PM Can we see this code? We can't help you very much if we don't have anything to work with. ;) izonmi89 08-21-2003, 11:09 PM Of course you can see the code!! Here it is: <script> /* Cross browser cursor trailer script By Brian Caputo (bcaputo@icdc.com) Written permission granted to lissaexplains.com to distribute the script for personal use. (DO NOT REMOVE THIS) */ B=document.all; C=document.layers; T1=new Array("http://www.tracemaesthemeland.com/sprkle.gif",38,35,"http://www.tracemaesthemeland.com/sprkle.gif",30,31,"http://www.tracemaesthemeland.com/sprkle.gif",28,26,"http://www.tracemaesthemeland.com/sprkle.gif",22,21,"http://www.tracemaesthemeland.com/sprkle.gif",16,16,"http://www.tracemaesthemeland.com/sprkle.gif",10,10) nos=parseInt(T1.length/3) rate=50 ie5fix1=0; ie5fix2=0; for (i=0;i<nos;i++){ createContainer("CUR"+i,i*10,i*10,i*3+1,i*3+2,"","<img src='"+T1[i*3]+"' width="+T1[(i*3+1)]+" height="+T1[(i*3+2)]+" border=0>")} function createContainer(N,Xp,Yp,W,H,At,HT,Op,St){ with (document){ write((!B) ? "<layer id='"+N+"' left="+Xp+" top="+Yp+" width="+W+" height="+H : "<div id='"+N+"'"+" style='position:absolute;left:"+Xp+"; top:"+Yp+"; width:"+W+"; height:"+H+"; "); if(St){ if (C) write(" style='"); write(St+";' ") } else write((B)?"'":""); write((At)? At+">" : ">"); write((HT) ? HT : ""); if (!Op) closeContainer(N) } } function closeContainer(){ document.write((B)?"</div>":"</layer>") } function getXpos(N){ return (B) ? parseInt(B[N].style.left) : C[N].left } function getYpos(N){ return (B) ? parseInt(B[N].style.top) : C[N].top } function moveContainer(N,DX,DY){ c=(B) ? B[N].style :C[N];c.left=DX;c.top=DY } function cycle(){ //if (IE5) if (document.all&&window.print){ ie5fix1=document.body.scrollLeft; ie5fix2=document.body.scrollTop; } for (i=0;i<(nos-1);i++){ moveContainer("CUR"+i,getXpos("CUR"+(i+1)),getYpos("CUR"+(i+1))) } } function newPos(e){ moveContainer("CUR"+(nos-1),(B)?event.clientX+ie5fix1:e.pageX+2,(B)?event.c lientY+ie5fix2:e.pageY+2 ) } if(document.layers) document.captureEvents(Event.MOUSEMOVE) document.onmousemove=newPos setInterval("cycle()",rate) </script> adrielle 08-22-2003, 03:59 AM but does the trail work? izonmi89 08-22-2003, 05:14 PM Yes. the cursor trail works well. The only problem is, I can no longer click on any of the links on my page! kittycat 08-22-2003, 05:51 PM I think that's just a general problem with that script - you always have trouble clicking links. You can get them eventually, but it takes a few clicks... probably the only real solution is just to not use the code :\ izonmi89 08-22-2003, 05:54 PM okay thanks! i guess ill keep trying but if anyone finds out if theres a better way, please let me know! |