aspose file tools*
The moose likes Programming Diversions and the fly likes Funny JavaScripts Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Other » Programming Diversions
Bookmark "Funny JavaScripts" Watch "Funny JavaScripts" New topic
Author

Funny JavaScripts

Devaka Cooray
ExamLab Creator
Saloon Keeper

Joined: Jul 29, 2008
Posts: 3102
    
  40

Found this while searching the web
Just copy the following code and paste into the browser's address bar, and then press enter.

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.images; 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; DIS.top=Math.cos(R*y1+i*y2+y3)*y4+y5}R++}setInterval('A()',5); void(0)

How cool is that?


Author of ExamLab ExamLab - a free SCJP / OCPJP exam simulator
What would SCJP exam questions look like? -- Home -- Twitter -- How to Ask a Question
fred rosenberger
lowercase baba
Bartender

Joined: Oct 02, 2003
Posts: 11314
    
  16

I tried it, it didn't do anything.


There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors
Sanjeewa Kumara
Greenhorn

Joined: Jan 29, 2009
Posts: 3
Cool! It works for me.
fred rosenberger
lowercase baba
Bartender

Joined: Oct 02, 2003
Posts: 11314
    
  16

all i see is a white screen.
Devaka Cooray
ExamLab Creator
Saloon Keeper

Joined: Jul 29, 2008
Posts: 3102
    
  40

fred rosenberger wrote:all i see is a white screen.


I think that JavaScript is disabled on your browser. Isn't it?
fred rosenberger
lowercase baba
Bartender

Joined: Oct 02, 2003
Posts: 11314
    
  16

no - it is not.

what is this supposed to do?
Devaka Cooray
ExamLab Creator
Saloon Keeper

Joined: Jul 29, 2008
Posts: 3102
    
  40

fred rosenberger wrote:no - it is not.

what is this supposed to do?


I couldn't understand that why you cannot see it. Did you copy the complete code correctly?
Mmmm...! Oh! I forgot to say that you cannot do this on a new tab/window of the browser. You should do this on the address bar of this (javaranch) tab/window.

This is supposed to fly images in the browser.
fred rosenberger
lowercase baba
Bartender

Joined: Oct 02, 2003
Posts: 11314
    
  16

well, that would indeed be the problem.
ozhan kaya
Greenhorn

Joined: Mar 19, 2009
Posts: 13
Devaka Cooray wrote:
fred rosenberger wrote:no - it is not.

what is this supposed to do?


I couldn't understand that why you cannot see it. Did you copy the complete code correctly?
Mmmm...! Oh! I forgot to say that you cannot do this on a new tab/window of the browser. You should do this on the address bar of this (javaranch) tab/window.

This is supposed to fly images in the browser.


hahaha.This is why i like Firefox too much.This code did not work in my firefox.IExplorer worked it.Because ie's job just this :useless things
Treimin Clark
Ranch Hand

Joined: Nov 12, 2008
Posts: 757
ozhan kaya wrote:This code did not work in my firefox.IExplorer worked it.Because ie's job just this :useless things


He he he it works for me on both FireFox and Chrome.

Ozhan, I would thank you for waking this topic , I didn't see this before.
ozhan kaya
Greenhorn

Joined: Mar 19, 2009
Posts: 13
Treimin Clark wrote:
ozhan kaya wrote:This code did not work in my firefox.IExplorer worked it.Because ie's job just this :useless things


He he he it works for me on both FireFox and Chrome.

Ozhan, I would thank you for waking this topic , I didn't see this before.


Yes works in firefox too.This is Cool.Just tryed shit IE I allways doing this becauze of old days:full of worms thanks to activex.
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 14153
    
  18

Wow, nice!


Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 7 API documentation
Scala Notes - My blog about Scala
Paul Yule
Ranch Hand

Joined: May 12, 2008
Posts: 229
Wow, that's pretty cool.
Praphulla Valluru
Ranch Hand

Joined: Apr 01, 2009
Posts: 32
Definitely cool
Brian Legg
Ranch Hand

Joined: Nov 07, 2008
Posts: 488
That's great!!


SCJA
~Currently preparing for SCJP6
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Funny JavaScripts