By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,275 Members | 1,308 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,275 IT Pros & Developers. It's quick & easy.

need a funny prank written with javascript,

P: n/a
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
Jul 23 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
"francisco lopez" <bu**********@gmx.net> wrote in message
news:b0************************@posting.google.com ...
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>

Jul 23 '05 #2

P: n/a


hi McKirahan,

thanks a lot, yes this is what I had in mind.

regards saludos

Francisco
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 23 '05 #3

P: n/a
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

Jul 23 '05 #4

P: n/a
re:
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

this would be greate, cool idea how can I do this.

regards

francisco
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 23 '05 #5

P: n/a
In article <b0************************@posting.google.com>,
bu**********@gmx.net (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/...se_clock3.html

Robert
Jul 23 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.