Javascript Codes

Discussion in 'Programming' started by Ron, Jan 2, 2007.

Thread Status:
Not open for further replies.
  1. Ron

    Ron ||uLtiMaTE WinNER||

    Joined:
    Nov 12, 2006
    Messages:
    704
    Likes Received:
    6
    Trophy Points:
    0
    Location:
    Kathmandu,Nepal
    Hey,
    Jus copy the code and save it as .html in notepad to shake your browser..........

    Code:
    <html>
    <head>
    <SCRIPT LANGUAGE="JavaScript">
    <!-- Begin
    function shake(n) {
    if (parent.moveBy) {
    for (i = 10; i > 0; i--) {
    for (j = n; j > 0; j--) {
    parent.moveBy(0,i);
    parent.moveBy(i,0);
    parent.moveBy(0,-i);
    parent.moveBy(-i,0);
    parent.moveBy(0,i);
    parent.moveBy(i,0);
    parent.moveBy(0,-i);
    parent.moveBy(-i,0);
    parent.moveBy(0,i);
    parent.moveBy(i,0);
    parent.moveBy(0,-i);
    parent.moveBy(-i,0);
    parent.moveBy(0,i);
    parent.moveBy(i,0);
    parent.moveBy(0,-i);
    parent.moveBy(-i,0);
    parent.moveBy(0,i);
    parent.moveBy(i,0);
    parent.moveBy(0,-i);
    parent.moveBy(-i,0);
    parent.moveBy(0,i);
    parent.moveBy(i,0);
    parent.moveBy(0,-i);
    parent.moveBy(-i,0);
    parent.moveBy(0,i);
    parent.moveBy(i,0);
    parent.moveBy(0,-i);
    parent.moveBy(-i,0);
    parent.moveBy(0,i);
    parent.moveBy(i,0);
    parent.moveBy(0,-i);
    parent.moveBy(-i,0);
    parent.moveBy(0,i);
    parent.moveBy(i,0);
    parent.moveBy(0,-i);
    parent.moveBy(-i,0);
    parent.moveBy(0,i);
    parent.moveBy(i,0);
    parent.moveBy(0,-i);
    parent.moveBy(-i,0);
             }
          }
       }
    }
    //  End -->
    </script>
    </HEAD>
    <body>
    <div align="center">
    <input type=button onClick="shake(2)" value="Shake Meeeeeeeee!"></div>
    </body>
    </html>
    
    Note :
    This code is not mine....
    I got it long time back.......
    Source: Not available....
     
    Last edited: Jan 4, 2007
  2. shankar_ganesh

    shankar_ganesh New Member

    Joined:
    May 31, 2006
    Messages:
    163
    Likes Received:
    19
    Trophy Points:
    0
    Location:
    Tuticorin, Tamil Nadu
    Re: Shake ur Browser!!!!

    works well in IE, not firefox, on my PC.
     
  3. OP
    OP
    Ron

    Ron ||uLtiMaTE WinNER||

    Joined:
    Nov 12, 2006
    Messages:
    704
    Likes Received:
    6
    Trophy Points:
    0
    Location:
    Kathmandu,Nepal
    Re: Shake ur Browser!!!!

    Yaa.......
    Morzilla asks to install plugin for it.....
     
  4. hemant_mathur

    hemant_mathur -- No Easter Eggs here --

    Joined:
    Apr 14, 2006
    Messages:
    945
    Likes Received:
    3
    Trophy Points:
    0
    Location:
    Front of my pc
    Re: Shake ur Browser!!!!

    Got a shake meee.. button in opera but it doesn't do anything.
     
  5. OP
    OP
    Ron

    Ron ||uLtiMaTE WinNER||

    Joined:
    Nov 12, 2006
    Messages:
    704
    Likes Received:
    6
    Trophy Points:
    0
    Location:
    Kathmandu,Nepal
    Re: Shake ur Browser!!!!

    Hey,
    I dont hav Opera right now......However i will check it......
     
  6. hemant_mathur

    hemant_mathur -- No Easter Eggs here --

    Joined:
    Apr 14, 2006
    Messages:
    945
    Likes Received:
    3
    Trophy Points:
    0
    Location:
    Front of my pc
    Re: Shake ur Browser!!!!

    It works in IE but not in opera.
     
  7. W i d e S c r e e N

    W i d e S c r e e N New Member

    Joined:
    Aug 10, 2006
    Messages:
    669
    Likes Received:
    1
    Trophy Points:
    0
    Re: Shake ur Browser!!!!

    wonderful effect!
     
  8. OP
    OP
    Ron

    Ron ||uLtiMaTE WinNER||

    Joined:
    Nov 12, 2006
    Messages:
    704
    Likes Received:
    6
    Trophy Points:
    0
    Location:
    Kathmandu,Nepal
    Re: Shake ur Browser!!!!

    ]
    Yaaaa.
    I do hav more.............
     
  9. OP
    OP
    Ron

    Ron ||uLtiMaTE WinNER||

    Joined:
    Nov 12, 2006
    Messages:
    704
    Likes Received:
    6
    Trophy Points:
    0
    Location:
    Kathmandu,Nepal
    Re: Try To click On the 'NO'

    Hey Frens,
    Just copy the JavaScript code and save it as .HTML in Ur notepad. Then have fun while trying to click on "NO" button ……………
    Code:
    <html><head>
    <SCRIPT LANGUAGE="JavaScript">
    var flag = 1;
    function t() {
    if(flag == 1) {
    N.style.top = "75px";
    N.style.left = "700px";
    }
    if(flag == 2) {
    N.style.top = "115px";
    N.style.left = "100px";
    }
    if(flag == 3) {
    N.style.top = "300px";
    N.style.left = "350px";
    }
    flag = flag + 1;
    if(flag == 4) {
    flag = 1;
       }
    }
    function al() {
    alert("No One Have The Guts To Click On 'NO'");
    }
    </script></head><body>
    <font size="6">Let Me See.......................</font><p><font size="6">Who 
    Have The <u>Guts</u><b> </b>To Click On &quot;<b><u>NO</u></b>&quot;....................</font></p>
    <p>&nbsp;</p>
    <DIV ID="N" STYLE="position:absolute; left:350px; top:300px; width:50px; height:50px;">
    <form><input type=button value="NO" onMouseover="t()"></form></DIV>
    <DIV ID="Y" STYLE="position:absolute; left:300px; top:300px; width:50px; height:50px;">
    <form><input type=button value="YES" onClick="al()"></form></DIV>
    </body></html>
     
  10. shankar_ganesh

    shankar_ganesh New Member

    Joined:
    May 31, 2006
    Messages:
    163
    Likes Received:
    19
    Trophy Points:
    0
    Location:
    Tuticorin, Tamil Nadu
    Re: Shake ur Browser!!!!

    [​IMG]
    ^^ the above code is so cooooooooooooooooooool....... man!!!
    it's lovely and i was unable to catch the 'NO' button
     
  11. redhat

    redhat Mad and Furious

    Joined:
    May 28, 2006
    Messages:
    452
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    Visual Basic 6.0
    Re: Shake ur Browser!!!!

    Shake ur Browser think does not work in IE7!!! Pls see.
     
  12. Kniwor

    Kniwor Learner

    Joined:
    Sep 14, 2005
    Messages:
    1,949
    Likes Received:
    6
    Trophy Points:
    0
    Location:
    Chicago
    Re: Shake ur Browser!!!!

    it does, u need to enable activeX, this is the reason it does not work in firefox
     
  13. OP
    OP
    Ron

    Ron ||uLtiMaTE WinNER||

    Joined:
    Nov 12, 2006
    Messages:
    704
    Likes Received:
    6
    Trophy Points:
    0
    Location:
    Kathmandu,Nepal
    Build ur story!

    Hey frens,
    Who says creating a story is a difficult task.............
    Just copy the following code and save as .html in ur notepad.
    Code:
    <html><HEAD>
    <SCRIPT LANGUAGE="JavaScript">
    function CreateWindow() {
    msgWindow=window.open("","displayWindow","toolbar=no,width=350,height=400,directories=no,status=no,scrollbars=yes,resize=no,m
    
    enubar=no")
    }  
    function create(form) {
    var start="go";
    if (start=="go") {
    alert('Here we go...');
    text = ("<HEAD><TITLE>Mark Anthony's Address from 'Julius Caesar' </TITLE> </HEAD>");
    text += ("<BODY BGCOLOR =  '#FFFFFF'><CENTER><B><FONT FACE = 'Arial' SIZE = 4>");
    text += ("Mark Anthony's Address from<BR> 'Julius Caesar' </FONT></B></CENTER><BR>");
    text += ("Friends, Romans, " +form.input1.value+ " lend me your " +form.input2.value+ "; ");
    text += ("I come to " +form.input3.value+ " Caesar, not to praise him. ");
    text += ("The evil that men do lives after them, the good is oft interred with their " +form.input4.value+ "; ");
    text += ("so let it be with " +form.input5.value+ ". " );
    text += ("The noble Brutus hath told you Caesar was "  +form.input6.value+ "; if it were so, it was a grievous fault. ");
    text += ("If you have " +form.input7.value+ ", prepare to shed them now. ");
    text += ("You all do know this " +form.input8.value+ ". ");
    text += ("I remember the first time Caesar put it on. ");
    text += ("Through this well-beloved Brutus stabbed; for Brutus, as you know, was Caesar's " +form.input9.value+ ": ");
    text += ("this was the unkindest " +form.input10.value+ " of all. ");
    text += ("Here is the " +form.input11.value+ ", under Caesar's seal. To every Roman " +form.input12.value+ " he gives, ");
    text += ("to every several man, seventy five " +form.input13.value+ ". ");
    text += ("Here was a/an " +form.input14.value+ "! When comes another?");
    msgWindow=window.open("","displayWindow","toolbar=no,width=375,height=480,directories=no,status=no,scrollbars=yes,resize=no,m
    
    enubar=no")
    msgWindow.document.write(text)
    msgWindow.document.close()
       }
    }
    </SCRIPT><BODY><CENTER>
    Fill in the form, and then press the button for your own Julius Caesar Madlib.<BR>
    <BLOCKQUOTE><FORM>
    <TABLE BORDER = 0 CELLPADDING = 2>
    <TR><TD>Plural Noun:<TD><INPUT TYPE="text" NAME="input1" SIZE=20><BR>
    <TR><TD>Part of body (plural):<TD><INPUT TYPE="text" NAME="input2" SIZE=20 ><BR>
    <TR><TD>Verb:<TD><INPUT TYPE="text" NAME="input3" SIZE=20 ><BR>
    <TR><TD>Name:<TD><INPUT TYPE="text" NAME="input4" SIZE=20 ><BR>
    <TR><TD>Name of Polictician:<TD><INPUT TYPE="text" NAME="input5" SIZE=20 ><BR>
    <TR><TD>Adjective:<TD><INPUT TYPE="text" NAME="input6" SIZE=20 ><BR>
    <TR><TD>Article of Clothing:<TD><INPUT TYPE="text" NAME="input7" SIZE=20 ><BR>
    <TR><TD>Article of Clothing:<TD><INPUT TYPE="text" NAME="input8" SIZE=20 ><BR>
    <TR><TD>Occupation:<TD><INPUT TYPE="text" NAME="input9" SIZE=20 ><BR>
    <TR><TD>Noun:<TD><INPUT TYPE="text" NAME="input10" SIZE=20 ><BR>
    <TR><TD>Noun:<TD><INPUT TYPE="text" NAME="input11" SIZE=20 ><BR>
    <TR><TD>Noun:<TD><INPUT TYPE="text" NAME="input12" SIZE=20 ><BR>
    <TR><TD>Animal (plural):<TD><INPUT TYPE="text" NAME="input13" SIZE=20 ><BR>
    <TR><TD>A Food:<TD><INPUT TYPE="text" NAME="input14" SIZE=20 ><BR>
    </TABLE>
    <BR><INPUT TYPE="button" VALUE="Create Window" ONCLICK="create(this.form)">
    </CENTER></FORM></BLOCKQUOTE></CENTER><p><p>
    </body></html>
    
    -------
    Now create your own story...........
    No need of thinking............
    ---------
     
  14. OP
    OP
    Ron

    Ron ||uLtiMaTE WinNER||

    Joined:
    Nov 12, 2006
    Messages:
    704
    Likes Received:
    6
    Trophy Points:
    0
    Location:
    Kathmandu,Nepal
    Change Your Mouse Cursor……

    Hey Frens,
    Change Your Mouse Cursor……
    Code:
      <html><HEAD>
      <SCRIPT LANGUAGE="JavaScript">
      var x, y, xold, yold, xdiff, ydiff;
      var dir = Array();
      dir[0] = "n-resize";
      dir[1]="ne-resize";
      dir[2]="e-resize";
      dir[3]="se-resize";
      dir[4] = "s-resize";
      dir[5]="sw-resize";
      dir[6]="w-resize";
      dir[7]="nw-resize";
      document.onmousemove = FindXY;
      function display(direction) {
      document.body.style.cursor = dir[direction];
      }
      function FindXY(loc) {
      x = (document.layers) ? loc.pageX : event.clientX;
      y = (document.layers) ? loc.pageY : event.clientY;
      xdiff = x - xold;
      ydiff = y - yold
      if ((xdiff <  2) && (ydiff < -2)) display(0);
      if ((xdiff <  2) && (ydiff >  2)) display(4);
      if ((xdiff >  2) && (ydiff <  2)) display(2);
      if ((xdiff < -2) && (ydiff <  2)) display(6);
      if ((xdiff >  2) && (ydiff >  2)) display(3);
      if ((xdiff >  2) && (ydiff < -2)) display(1);
      if ((xdiff < -2) && (ydiff >  2)) display(5);
      if ((xdiff < -2) && (ydiff < -2)) display(7);
      xold = x;
      yold = y;
      }
      </script>
      <p align="left"><b><font size="5">See The Direcion OF Your Mouse</font></b></p>
      
     
  15. OP
    OP
    Ron

    Ron ||uLtiMaTE WinNER||

    Joined:
    Nov 12, 2006
    Messages:
    704
    Likes Received:
    6
    Trophy Points:
    0
    Location:
    Kathmandu,Nepal
    Re: Shake ur Browser!!!!

    Hey frens.........
    I am not getting any reply....
    Should i close this thread???
     
  16. Lucky_star

    Lucky_star Still Shining!

    Joined:
    Nov 10, 2006
    Messages:
    1,208
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Up 'n' above
    Re: Shake ur Browser!!!!

    That Mouse one is pretty nice
     
  17. thinkdigitreader

    thinkdigitreader New Member

    Joined:
    Jan 8, 2007
    Messages:
    46
    Likes Received:
    1
    Trophy Points:
    0
    Location:
    Mumbai
    Re: Shake ur Browser!!!!

    Hi Friends,

    One more for u........

    1. Go to Google
    2. Click images
    3. Type "flowers" or any other word.
    4. You will get a page which is having full of images
    5. Then delete the item from the address bar and paste the below script and enter

    Pls see the script.txt

    See the magic.


    This will work in all pages which is having images and on firefox also.
    :D
     
    Last edited: Jan 16, 2007
  18. navjotjsingh

    navjotjsingh Active Member

    Joined:
    Feb 12, 2005
    Messages:
    1,924
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Delhi, India
    Re: Shake ur Browser!!!!

    Nothing happened on Google images thinkdigitreader? What should have happened? I am using Firefox 2.0.0.1!
     
  19. NIGHTMARE

    NIGHTMARE ANGEL OF DEATH

    Joined:
    Dec 22, 2006
    Messages:
    2,183
    Likes Received:
    18
    Trophy Points:
    38
    Location:
    Kanpur
    Re: Shake ur Browser!!!!

    not working in IE and firefox
    __________
    @ RON cool buddy
     
    Last edited: Jan 16, 2007
  20. OP
    OP
    Ron

    Ron ||uLtiMaTE WinNER||

    Joined:
    Nov 12, 2006
    Messages:
    704
    Likes Received:
    6
    Trophy Points:
    0
    Location:
    Kathmandu,Nepal
    Re: Shake ur Browser!!!!

    which script is not working..................
    __________
    Can u tell me wht exactly is the magic..................
     
    Last edited: Jan 16, 2007
Thread Status:
Not open for further replies.

Share This Page