Page 2 of 5 FirstFirst 12345 LastLast
Results 11 to 20 of 49

Thread: Trippy thing to do with "Google Images"

  1. #11
    100%'s Avatar ╚════╩═╬════╝
    Join Date
    Jan 2003
    Posts
    13,383
    Tesco fixed it.
    Nice
    but why does this happen?

  2. Internet, Programming and Graphics   -   #12
    tesco's Avatar woowoo
    Join Date
    Aug 2003
    Location
    Canadia
    Posts
    21,669
    Quote Originally Posted by 100% View Post
    Tesco fixed it.
    Nice
    but why does this happen?
    It's just what that js code does.
    It finds all <img> tags on the page then starts moving them around.
    You can change the code to do any other tag as well like div, span, strong, table, a, etc.

  3. Internet, Programming and Graphics   -   #13
    BANNED
    Join Date
    Apr 2009
    Location
    Newcastle
    Posts
    2
    haha thats awsome lol

    thanks for that

  4. Internet, Programming and Graphics   -   #14
    ronscores's Avatar Bludgeoning Boner!!
    Join Date
    Aug 2005
    Posts
    90
    Quote Originally Posted by tesco View Post
    Quote Originally Posted by 100% View Post
    Tesco fixed it.
    Nice
    but why does this happen?
    It's just what that js code does.
    It finds all <img> tags on the page then starts moving them around.
    You can change the code to do any other tag as well like div, span, strong, table, a, etc.
    Real awesome.
    You a java coder btw?
    Last edited by ronscores; 04-11-2009 at 02:10 AM.

  5. Internet, Programming and Graphics   -   #15
    tesco's Avatar woowoo
    Join Date
    Aug 2003
    Location
    Canadia
    Posts
    21,669
    Quote Originally Posted by ronscores View Post
    Quote Originally Posted by tesco View Post
    It's just what that js code does.
    It finds all <img> tags on the page then starts moving them around.
    You can change the code to do any other tag as well like div, span, strong, table, a, etc.
    Real awesome.
    You a java coder btw?
    no.

  6. Internet, Programming and Graphics   -   #16
    Snee's Avatar Error xɐʇuʎs BT Rep: +1
    Join Date
    Sep 2003
    Location
    on something.
    Age
    44
    Posts
    17,985
    Quote Originally Posted by ronscores View Post
    Quote Originally Posted by tesco View Post
    It's just what that js code does.
    It finds all <img> tags on the page then starts moving them around.
    You can change the code to do any other tag as well like div, span, strong, table, a, etc.
    Real awesome.
    You a java coder btw?
    javascript != java.

    -=-=-

    We once toyed with the idea of screwing up someone else's start page in their browser with a script like that, as a practical joke, like.

    Was gonna put the original page in a frame, or use it as the source for an object, and then stick that in a new page and add the script to it. Maybe calling it onload, with a bit of a delay so it looked normal first. Just never got around to it.

    You can mess around a bit with the numbers in the equation and positioning, as well.

    Code:
    javascript:R=0; x1=.1; y1=.05; x2=.25; y2=.24; x3=1.6; y3=.24; x4=300; y4=200; x5=300; y5=1000; DI=document.getElementsByTagName("img"); DIL=DI.length; function A(){for(i=0; i-DIL; i++){DIS=DI[ i ].style; DIS.position='absolute'; DIS.left=(Math.sin(R*x1+i*x2+x3)*x4+x5)+"px"; DIS.top=(Math.cos(R*y1+i*y2+y3)*y4+y5)+"px"}R++}setInterval('A()',50); void(0)
    changes its position.

    Code:
    javascript:R=0; x1=.1; y1=.05; x2=.25; y2=.24; x3=1.6; y3=.24; x4=300; y4=200; x5=300; y5=200; DI=document.getElementsByTagName("img"); DIL=DI.length; function A(){for(i=0; i-DIL; i++){DIS=DI[ i ].style; DIS.position='absolute'; DIS.left=(Math.sin(R*x1+i*x3+x3)*x4+x5)+"px"; DIS.top=(Math.cos(R*y1+i*y2+y3)*y4+y5)+"px"}R++}setInterval('A()',50); void(0)
    Makes them move in another pattern. etc.
    Last edited by Snee; 04-12-2009 at 06:12 PM.

  7. Internet, Programming and Graphics   -   #17
    KFlint's Avatar ... BT Rep: +35BT Rep +35BT Rep +35BT Rep +35BT Rep +35BT Rep +35BT Rep +35
    Join Date
    Mar 2007
    Posts
    4,056
    Quote Originally Posted by ronscores View Post
    Real awesome.
    You a java coder btw?
    JavaScript = client-side, executes in your browser
    Java = server-side to generate dynamic HTML pages or for standalone apps.

    Anyone coding web applications deal with Javascript to add interaction to the pages (AJAX, form validation etc...) whether they are coding in PHP, Java, Ruby etc...

    Hope that's enlightening for a neophyte
    Last edited by KFlint; 04-13-2009 at 12:02 AM.

  8. Internet, Programming and Graphics   -   #18
    SaveFerris's Avatar ŻŻŻŻŻŻŻŻŻŻŻŻ
    Join Date
    Oct 2006
    Location
    England
    Posts
    215
    I made my own version of one of these when bored in school a few months back.
    Code:
    javascript:amm=20;sta=2;vri=8;stH=40;saW=screen.availWidth;fiA="<img src='http://fish.sferris.net/f3.png' />";fiB="<img src='http://fish.sferris.net/f2.png' />";poA=new Array();poB=new Array();i=0;for(i=0;i<amm;i++){poA[i]=Math.round(Math.random()*saW);ff=document.createElement("div");ff.innerHTML=fiA;ff.id="fA"+i;ff.style.position='absolute';ff.style.left=poA[i]+"px";ff.style.top=(i*stH)+"px";document.body.appendChild(ff)}for(i=0;i<amm;i++){poB[i]=Math.round(Math.random()*saW);ff=document.createElement("div");ff.innerHTML=fiB;ff.id="fB"+i;ff.style.position='absolute';ff.style.left=poB[i]+"px";ff.style.top=((i*stH)+(stH/2))+"px";document.body.appendChild(ff)}function lFi(){for(i=0;i<amm;i++){poA[i]+=(Math.random()*vri)+sta;if(poA[i]>saW)poA[i]=-100;document.getElementById("fA"+i).style.left=poA[i]+"px"}for(i=0;i<amm;i++){poB[i]-=(Math.random()*vri)+sta;if(poB[i]<-100)poB[i]=saW;document.getElementById("fB"+i).style.left=poB[i]+"px"}}lf=setInterval("lFi()",25);void(0)
    Scroll to the top of the page.

  9. Internet, Programming and Graphics   -   #19
    iLOVENZB's Avatar FST Crew BT Rep: +1
    Join Date
    Sep 2008
    Location
    Land gurt by sea
    Posts
    8,337
    Quote Originally Posted by SaveFerris View Post
    I made my own version of one of these when bored in school a few months back.
    OMG Nemo lol.

  10. Internet, Programming and Graphics   -   #20
    Cool parlor tricks.

Page 2 of 5 FirstFirst 12345 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •