need a funny prank written with javascript,

Discussion in 'Javascript' started by francisco lopez, Jan 4, 2005.

  1. hi,

    well I think I will forget the earthquake-effect, because it doesn´t
    run in a frame with IE,
    so I need now another funny prank, but not the format C: fake, I was
    thinking for example that a little windows will open and when you try
    to close it, it allways jumps away from the cursor, this would be
    funny, well any idea is wellcome, hope that this time someone can
    help.

    regards

    francisco
    francisco lopez, Jan 4, 2005
    #1
    1. Advertising

  2. francisco lopez

    McKirahan Guest

    "francisco lopez" <> wrote in message
    news:...
    > hi,
    >
    > well I think I will forget the earthquake-effect, because it doesn´t
    > run in a frame with IE,
    > so I need now another funny prank, but not the format C: fake, I was
    > thinking for example that a little windows will open and when you try
    > to close it, it allways jumps away from the cursor, this would be
    > funny, well any idea is wellcome, hope that this time someone can
    > help.
    >
    > regards
    >
    > francisco


    This move's a small popup window around.

    Not very good but this might get you thinking.

    Enhancement #1: onMouseOver the window not just the words.

    Enhancement #2: randomize the movement.


    <html>
    <head>
    <title>mover.htm</title>
    <script type="text/javascript">
    var winx = 100;
    var winy = 50;
    var winz = ",width=" + winx + ",height=" + winy;
    var html = "<html><head><title>mover</title>";
    html += "<" + "script type='text/javascript'>";
    html += "var winx = " + winx + ";";
    html += "var winy = " + winy + ";";
    html += "function mover() {";
    html += " var x = window.event.screenX + 50;";
    html += " var y = window.event.screenY + 50;";
    html += " if (screen.width - winx - x < 0) {";
    html += " x = window.event.screenX - 150;";
    html += " }";
    html += " if (screen.Height - winy - y < 0) {";
    html += " y = window.event.screenY - 150;";
    html += " }";
    html += " moveTo(x,y);";
    html += "}";
    html += "<" + "/script></head><body>";
    html += "<span onmouseover='mover()'>";
    html += "<center><b>Alt+F4<br>to close.</b></center>";
    html += "</span>";
    html += "</body></html>";
    function mover() {
    var wind = window.open("","hmtl","statusbar=0" + winz);
    wind.document.write(html);
    }
    </script>
    </head>
    <body>
    <a href="javascript:mover()">mover()</a>
    </body>
    </html>
    McKirahan, Jan 4, 2005
    #2
    1. Advertising

  3. francisco lopez

    Guest

    you can also make people's cd-rom drives open, but i don't know if that
    is the kind of thing you're looking for
    , Jan 4, 2005
    #3
  4. francisco lopez

    Robert Guest

    In article <>,
    (francisco lopez) wrote:

    > so I need now another funny prank,


    There are lots of virtual cats following the mouse icon around on the
    screen. Try google. javascript cat

    Here is one that does a clock. It is kind of slow to response. You have
    to leave your mouse in one place for awhile. Might like the fact that
    when you move the mouse a bunch of characters wonder around the screen.

    http://rainbow.arch.scriptmania.com/scripts/mouse_clock3.html

    Robert
    Robert, Jan 5, 2005
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Steve C. Orr, MCSD
    Replies:
    1
    Views:
    549
    reaway lee
    Aug 24, 2003
  2. Jokeline

    Prank Call Service

    Jokeline, Aug 9, 2003, in forum: Python
    Replies:
    0
    Views:
    456
    Jokeline
    Aug 9, 2003
  3. abigaillicad

    dlwh why are you prank calling people

    abigaillicad, Mar 7, 2011, in forum: C++
    Replies:
    0
    Views:
    246
    abigaillicad
    Mar 7, 2011
  4. KaiWen
    Replies:
    102
    Views:
    2,664
    Jorgen Grahn
    Sep 15, 2011
  5. Dov Levenglick

    funny printf behaviour in need of explanation

    Dov Levenglick, Jul 1, 2003, in forum: Perl Misc
    Replies:
    5
    Views:
    135
    Dov Levenglick
    Jul 3, 2003
Loading...

Share This Page