Voting Chart

Total votes : 2

What is your web design program

  •  
    Frontpage
  •  
    Dreamweaver

Code Inspection

  • Pure Evil 2
  • Banned
  • Banned
  • Pure Evil 2
  • Posts: 2

Post 3+ Months Ago

could sum1 please have a look at this code and tell me why only the 5 by 5 pixel image follows the cursor

here is the code, its the part separated by the <script> and </script>

Code: [ Select ]

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body>
<script>
B=document.all;
C=document.layers;
T1=new Array("image1.jpg",50,50,"image1.jpg",40,40,"image1.jpg",30,30,"image1.jpg",20,20,"image1.jpg",10,10,"image1.jpg",5,5)
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.clientY+ie5fix2:e.pageY+2
)
}
if(document.layers)
document.captureEvents(Event.MOUSEMOVE)
document.onmousemove=newPos
setInterval("cycle()",rate)
</script>
<table width="800" height="600" border="0">
 <tr>
  <td width="168" height="84">&nbsp;</td>
  <td width="462"><h3>Stacey Barnes, Peter Mcavan and Alexandre Vaz-Filion's</h3>
  <h3> Olympic Project </h3></td>
  <td width="156">&nbsp;</td>
 </tr>
 <tr>
  <td>&nbsp;</td>
  <td>&nbsp;</td>
  <td>&nbsp;</td>
 </tr>
</table>
</body>
</html>
  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
  2. "http://www.w3.org/TR/html4/loose.dtd">
  3. <html>
  4. <head>
  5. <title>Untitled Document</title>
  6. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  7. </head>
  8. <body>
  9. <script>
  10. B=document.all;
  11. C=document.layers;
  12. T1=new Array("image1.jpg",50,50,"image1.jpg",40,40,"image1.jpg",30,30,"image1.jpg",20,20,"image1.jpg",10,10,"image1.jpg",5,5)
  13. nos=parseInt(T1.length/3)
  14. rate=50
  15. ie5fix1=0;
  16. ie5fix2=0;
  17. for (i=0;i<nos;i++){
  18. 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>")}
  19. function createContainer(N,Xp,Yp,W,H,At,HT,Op,St){
  20. with (document){
  21. 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+"; ");
  22. if(St){
  23. if (C)
  24. write(" style='");
  25. write(St+";' ")
  26. }
  27. else write((B)?"'":"");
  28. write((At)? At+">" : ">");
  29. write((HT) ? HT : "");
  30. if (!Op)
  31. closeContainer(N)
  32. }
  33. }
  34. function closeContainer(){
  35. document.write((B)?"</div>":"</layer>")
  36. }
  37. function getXpos(N){
  38. return (B) ? parseInt(B[N].style.left) : C[N].left
  39. }
  40. function getYpos(N){
  41. return (B) ? parseInt(B[N].style.top) : C[N].top
  42. }
  43. function moveContainer(N,DX,DY){
  44. c=(B) ? B[N].style :C[N];c.left=DX;c.top=DY
  45. }
  46. function cycle(){
  47. //if (IE5)
  48. if (document.all&&window.print){
  49. ie5fix1=document.body.scrollLeft;
  50. ie5fix2=document.body.scrollTop;
  51. }
  52. for (i=0;i<(nos-1);i++){
  53. moveContainer("CUR"+i,getXpos("CUR"+(i+1)),getYpos("CUR"+(i+1)))
  54. }
  55. }
  56. function newPos(e){
  57. moveContainer("CUR"+(nos-1),(B)?event.clientX+ie5fix1:e.pageX+2,(B)?event.clientY+ie5fix2:e.pageY+2
  58. )
  59. }
  60. if(document.layers)
  61. document.captureEvents(Event.MOUSEMOVE)
  62. document.onmousemove=newPos
  63. setInterval("cycle()",rate)
  64. </script>
  65. <table width="800" height="600" border="0">
  66.  <tr>
  67.   <td width="168" height="84">&nbsp;</td>
  68.   <td width="462"><h3>Stacey Barnes, Peter Mcavan and Alexandre Vaz-Filion's</h3>
  69.   <h3> Olympic Project </h3></td>
  70.   <td width="156">&nbsp;</td>
  71.  </tr>
  72.  <tr>
  73.   <td>&nbsp;</td>
  74.   <td>&nbsp;</td>
  75.   <td>&nbsp;</td>
  76.  </tr>
  77. </table>
  78. </body>
  79. </html>


The code is done in DreamWeaver MX 2004
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • Pure Evil 2
  • Banned
  • Banned
  • Pure Evil 2
  • Posts: 2

Post 3+ Months Ago

Bump!
  • lioness
  • Mastermind
  • Mastermind
  • User avatar
  • Posts: 1615

Post 3+ Months Ago

My web-design program is Notepad... not an option on your poll though... :cry:
  • UNFLUX
  • Genius
  • Genius
  • User avatar
  • Posts: 6376
  • Loc: twitter.com/unflux

Post 3+ Months Ago

Pure Evil was banned and has now been banned again.
  • Mr Smith
  • Graduate
  • Graduate
  • Mr Smith
  • Posts: 150
  • Loc: Birmingham, England

Post 3+ Months Ago

UNFLUX wrote:
Pure Evil was banned and has now been banned again.


uhm...if i can ask....why was he banned?


btw....for the sake of the poll.....i use notepad also...

:P
  • quartz01
  • Newbie
  • Newbie
  • quartz01
  • Posts: 7

Post 3+ Months Ago

i used to use notepad when i was using winblows but know that i am using Mandrake 10.0 (Linux) i use Kwrite.. its much better because it makes the codes bold automatically and makes certian codes color so its much much easier to edit it... i suggest notepad users go download MandrakeMove (its a free and legal operating system thats bootable from a CD-rom and you can convert the files to windows automatically)

boy i went kinda off topic there :oops:
  • joebert
  • Fart Bubbles
  • Genius
  • User avatar
  • Posts: 13502
  • Loc: Florida

Post 3+ Months Ago

Mr Smith wrote:
UNFLUX wrote:
Pure Evil was banned and has now been banned again.

uhm...if i can ask....why was he banned?


They didn't read this topic very well :wink:
http://www.ozzu.com/announcements-rules/ozzu-rules-and-regulations-t697.html

Post Information

  • Total Posts in this topic: 7 posts
  • Users browsing this forum: No registered users and 43 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.