need a funny prank written with javascript,

  • Thread starter francisco lopez
  • Start date
F

francisco lopez

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
 
M

McKirahan

francisco lopez said:
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>
 
M

mark.oliveira

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top