Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Other Discussions
  3. The Weird and The Wonderful
  4. Funny Javascript

Funny Javascript

Scheduled Pinned Locked Moved The Weird and The Wonderful
csharpjavascript
14 Posts 9 Posters 10 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Michael Sync

    It did something. maybe. cuz of HTML text... You may download the txt file from this link http://michaelsync.net/2007/02/28/fun-playing-with-javascript/ let me know if it doesn't work.

    Thanks and Regards, Michael Sync ( Blog: http://michaelsync.net)

    P Offline
    P Offline
    Psycho Coder Extreme
    wrote on last edited by
    #4

    I tried them all in all browsers and nothing happens

    "Well yes, it is an Integer, but it's a metrosexual Integer. For all we know, under all that hair gel it could be a Boolean." Tom Welch

    M 1 Reply Last reply
    0
    • P Psycho Coder Extreme

      I tried them all in all browsers and nothing happens

      "Well yes, it is an Integer, but it's a metrosexual Integer. For all we know, under all that hair gel it could be a Boolean." Tom Welch

      M Offline
      M Offline
      Michael Sync
      wrote on last edited by
      #5

      Have you downloaded the txt file? If you haven't, please download the txt file. You can check the comments in that post. The script works for those commenter when they download the txt file. I think that copying code from post make some problems. It should work on either firefox or IE6/7. Please try again. Hope it works. :)

      Thanks and Regards, Michael Sync ( Blog: http://michaelsync.net)

      1 Reply Last reply
      0
      • P Psycho Coder Extreme

        Well none of these did anything in either IE or FireFox, what was I supposed to see?

        "Let's face it, the average computer user has the brain of a Spider Monkey." Bill Gates

        D Offline
        D Offline
        DavidNohejl
        wrote on last edited by
        #6

        Turn on firebug and you will see it's doing a lot... errors. :)


        "Throughout human history, we have been dependent on machines to survive. Fate, it seems, is not without a sense of irony. " - Morpheus "Real men use mspaint for writing code and notepad for designing graphics." - Anna-Jayne Metcalfe

        1 Reply Last reply
        0
        • M Michael Sync

          Fun #1: 1. Go to any website (eg: Google Personalized HomePage) 2. Delete everything in the address bar 3. paste the following code in the address bar: 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); 4. Press enter and have fun! :) Thanks to Grim. Fun #2: 1. Go to Google Classic Homepage (*NOT Personalized Home.*)) 2. Delete everything in the address bar 3. paste the following code in the address bar: javascript:i=100;void(setInterval("i++;document.images[1].width=i",5),setInterval("i++;document.images[1].height=i",5),setInterval("i++;document.images[2].width=i",5),setInterval("i++;document.images[2].height=i",5),setInterval("i++;document.images[3].width=i",5),setInterval("i++;document.images[3].height=i",5),setInterval("i++;document.images[4].width=i",5) ,setInterval("i++;document.images[4].height=i",5) ) 4. Press Enter Thanks to Harpreet and Philip(Ye Maung). Fun #3: 1. Launch Internet Explorer 2. Delete everything in the address bar 3. paste the following code in the address bar: javascript:function flood(n) {if (self.moveBy) {for (i = 15; i > 0;i–){for (j = n; j > 0; j–){self.moveBy(1,i);self.moveBy(i,0);self.moveBy(0,-i);self.moveBy(-i,0); } } }}flood(6);{ var inp = "MIKE morf ,ecnavda ni RAEY WEN YPPAH ,iH"; var outp = ""; for (i = 0; i <= inp.length; i++) {outp =inp.charAt (i) + outp ; } alert(outp) ;}; reverse 4. Press Enter Thanks to the author of this post. Fun #4: last but not least :) 1. Launch Internet Explorer 2. Delete everything in the address bar 3. paste the following code in the address bar: javascript:function reverse() { var inp = " )-: krow ru no yrrac ko.mih morf nraeL .seod CNYS LEAHCIM ekil krow lufesu emos oD .esnesnon siht lla gniod rof uoy gniyap ton si ynapmoC"; var outp = ""; for (i = 0; i <= inp.length; i++) { outp = inp.charAt (i) + outp ; } alert(outp) ;}; reverse() 4. Press Enter Source Download : [Funny] Playing with Javascript

          Thanks and Regards, Michael Sync ( Blog:

          P Offline
          P Offline
          Pete OHanlon
          wrote on last edited by
          #7

          I'm sorry, but how does this fit into the Coding Horrors section? Have you encountered these items in development/production? They just seem to be "amusing" things to do with JavaScript.

          Please visit http://www.readytogiveup.com/ and do something special today. Deja View - the feeling that you've seen this post before.

          P 1 Reply Last reply
          0
          • P Pete OHanlon

            I'm sorry, but how does this fit into the Coding Horrors section? Have you encountered these items in development/production? They just seem to be "amusing" things to do with JavaScript.

            Please visit http://www.readytogiveup.com/ and do something special today. Deja View - the feeling that you've seen this post before.

            P Offline
            P Offline
            Phil J Pearson
            wrote on last edited by
            #8

            I think it's clear that Michael Sync is a Coding Horror!

            Phil


            The opinions expressed in this post are not necessarily those of the author, especially if you find them impolite, inaccurate or inflammatory.

            P M S S 4 Replies Last reply
            0
            • P Phil J Pearson

              I think it's clear that Michael Sync is a Coding Horror!

              Phil


              The opinions expressed in this post are not necessarily those of the author, especially if you find them impolite, inaccurate or inflammatory.

              P Offline
              P Offline
              Pete OHanlon
              wrote on last edited by
              #9

              :laugh:

              Please visit http://www.readytogiveup.com/ and do something special today. Deja View - the feeling that you've seen this post before.

              1 Reply Last reply
              0
              • P Phil J Pearson

                I think it's clear that Michael Sync is a Coding Horror!

                Phil


                The opinions expressed in this post are not necessarily those of the author, especially if you find them impolite, inaccurate or inflammatory.

                M Offline
                M Offline
                Michael Sync
                wrote on last edited by
                #10

                >>I think it's clear that Michael Sync is a Coding Horror! :) >>Turn on firebug and you will see it's doing a lot... errors. this is code horror..

                Thanks and Regards, Michael Sync ( Blog: http://michaelsync.net)

                1 Reply Last reply
                0
                • P Phil J Pearson

                  I think it's clear that Michael Sync is a Coding Horror!

                  Phil


                  The opinions expressed in this post are not necessarily those of the author, especially if you find them impolite, inaccurate or inflammatory.

                  S Offline
                  S Offline
                  Sylvester george
                  wrote on last edited by
                  #11

                  yep very true :)

                  Regards, Sylvester G

                  1 Reply Last reply
                  0
                  • P Phil J Pearson

                    I think it's clear that Michael Sync is a Coding Horror!

                    Phil


                    The opinions expressed in this post are not necessarily those of the author, especially if you find them impolite, inaccurate or inflammatory.

                    S Offline
                    S Offline
                    Sathesh Sakthivel
                    wrote on last edited by
                    #12

                    :laugh::laugh:

                    Regards, Satips.:rose: Don't walk in front of me, I may not follow; Don't walk behind me, I may not lead; Walk beside me, and just be my friend. - Albert Camus

                    1 Reply Last reply
                    0
                    • M Michael Sync

                      Fun #1: 1. Go to any website (eg: Google Personalized HomePage) 2. Delete everything in the address bar 3. paste the following code in the address bar: 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); 4. Press enter and have fun! :) Thanks to Grim. Fun #2: 1. Go to Google Classic Homepage (*NOT Personalized Home.*)) 2. Delete everything in the address bar 3. paste the following code in the address bar: javascript:i=100;void(setInterval("i++;document.images[1].width=i",5),setInterval("i++;document.images[1].height=i",5),setInterval("i++;document.images[2].width=i",5),setInterval("i++;document.images[2].height=i",5),setInterval("i++;document.images[3].width=i",5),setInterval("i++;document.images[3].height=i",5),setInterval("i++;document.images[4].width=i",5) ,setInterval("i++;document.images[4].height=i",5) ) 4. Press Enter Thanks to Harpreet and Philip(Ye Maung). Fun #3: 1. Launch Internet Explorer 2. Delete everything in the address bar 3. paste the following code in the address bar: javascript:function flood(n) {if (self.moveBy) {for (i = 15; i > 0;i–){for (j = n; j > 0; j–){self.moveBy(1,i);self.moveBy(i,0);self.moveBy(0,-i);self.moveBy(-i,0); } } }}flood(6);{ var inp = "MIKE morf ,ecnavda ni RAEY WEN YPPAH ,iH"; var outp = ""; for (i = 0; i <= inp.length; i++) {outp =inp.charAt (i) + outp ; } alert(outp) ;}; reverse 4. Press Enter Thanks to the author of this post. Fun #4: last but not least :) 1. Launch Internet Explorer 2. Delete everything in the address bar 3. paste the following code in the address bar: javascript:function reverse() { var inp = " )-: krow ru no yrrac ko.mih morf nraeL .seod CNYS LEAHCIM ekil krow lufesu emos oD .esnesnon siht lla gniod rof uoy gniyap ton si ynapmoC"; var outp = ""; for (i = 0; i <= inp.length; i++) { outp = inp.charAt (i) + outp ; } alert(outp) ;}; reverse() 4. Press Enter Source Download : [Funny] Playing with Javascript

                      Thanks and Regards, Michael Sync ( Blog:

                      D Offline
                      D Offline
                      dekart_roo
                      wrote on last edited by
                      #13

                      First one: 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); It gave errors on DIS.position=’absolute’ and setInterval(’A()’,5) Because ’ != '

                      1 Reply Last reply
                      0
                      • M Michael Sync

                        Fun #1: 1. Go to any website (eg: Google Personalized HomePage) 2. Delete everything in the address bar 3. paste the following code in the address bar: 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); 4. Press enter and have fun! :) Thanks to Grim. Fun #2: 1. Go to Google Classic Homepage (*NOT Personalized Home.*)) 2. Delete everything in the address bar 3. paste the following code in the address bar: javascript:i=100;void(setInterval("i++;document.images[1].width=i",5),setInterval("i++;document.images[1].height=i",5),setInterval("i++;document.images[2].width=i",5),setInterval("i++;document.images[2].height=i",5),setInterval("i++;document.images[3].width=i",5),setInterval("i++;document.images[3].height=i",5),setInterval("i++;document.images[4].width=i",5) ,setInterval("i++;document.images[4].height=i",5) ) 4. Press Enter Thanks to Harpreet and Philip(Ye Maung). Fun #3: 1. Launch Internet Explorer 2. Delete everything in the address bar 3. paste the following code in the address bar: javascript:function flood(n) {if (self.moveBy) {for (i = 15; i > 0;i–){for (j = n; j > 0; j–){self.moveBy(1,i);self.moveBy(i,0);self.moveBy(0,-i);self.moveBy(-i,0); } } }}flood(6);{ var inp = "MIKE morf ,ecnavda ni RAEY WEN YPPAH ,iH"; var outp = ""; for (i = 0; i <= inp.length; i++) {outp =inp.charAt (i) + outp ; } alert(outp) ;}; reverse 4. Press Enter Thanks to the author of this post. Fun #4: last but not least :) 1. Launch Internet Explorer 2. Delete everything in the address bar 3. paste the following code in the address bar: javascript:function reverse() { var inp = " )-: krow ru no yrrac ko.mih morf nraeL .seod CNYS LEAHCIM ekil krow lufesu emos oD .esnesnon siht lla gniod rof uoy gniyap ton si ynapmoC"; var outp = ""; for (i = 0; i <= inp.length; i++) { outp = inp.charAt (i) + outp ; } alert(outp) ;}; reverse() 4. Press Enter Source Download : [Funny] Playing with Javascript

                        Thanks and Regards, Michael Sync ( Blog:

                        J Offline
                        J Offline
                        javaJones
                        wrote on last edited by
                        #14

                        nothing happened... what are we supposed to see?:wtf:

                        1 Reply Last reply
                        0
                        Reply
                        • Reply as topic
                        Log in to reply
                        • Oldest to Newest
                        • Newest to Oldest
                        • Most Votes


                        • Login

                        • Don't have an account? Register

                        • Login or register to search.
                        • First post
                          Last post
                        0
                        • Categories
                        • Recent
                        • Tags
                        • Popular
                        • World
                        • Users
                        • Groups