I'm making a script that moves windows around like the boxes on the Minority Report site. I've got another script that does one window, and i'm modding it to work like those boxes. Only when i start it off, the box just wanders off down the screen untill it disappears and is never heard from again.
This is the page:
<html>
<head>
<script>
function xopen(wins,speed,config,spacing){
if (config == ""){
document.status="!You have not set a config number!";
}
if (config == "1"){
var left=(window.screen.availWidth / 2)-(99/2);
var top=(window.screen.availHeight / 2)-(99/2);
if (wins >= 1){
var winone = window.open("","","left="+left+", top="+top+", width=99, height=99, scrollbars=no, status=no, resizable=no");
}
if (wins >= 2){
var wintwo = window.open("","","left="+left+", top="+top+", width=99, height=99, scrollbars=no, status=no, resizable=no");
}
if (wins >= 3){
var winthr = window.open("","","left="+left+", top="+top+", width=99, height=99, scrollbars=no, status=no, resizable=no");
}
if (wins > 3){
document.status="!Only 3 windows allowed!";
}
winone.focus();
var widthspeed=speed
var heightspeed=speed/1.333333
if (wins >= 3){
var onego = 99+spacing
var twogo = 99
var thrgo = 99+spacing
}
if (wins == 2){
var onego = 99+(spacing/2)
var twogo = 99-(spacing/2)
}
if (wins == 1){
var onego = 99
}
var goiup = 0
for (goiup; goiup <= onego; goiup += heightspeed)
{
winone.moveTo((window.screen.availWidth/2)-(99/2), ((window.screen.availHeight/2)+goiup))
goiup += heightspeed
}
}
}
</script>
</head>
<body>
<input type="button" onClick="xopen('3','1','1','50')">
</body>
</html>
PLEASSE HELP.
I'm going insane with this thing... (*Thinks*)
*More insane.
Ta
D2K2

This is the page:
<html>
<head>
<script>
function xopen(wins,speed,config,spacing){
if (config == ""){
document.status="!You have not set a config number!";
}
if (config == "1"){
var left=(window.screen.availWidth / 2)-(99/2);
var top=(window.screen.availHeight / 2)-(99/2);
if (wins >= 1){
var winone = window.open("","","left="+left+", top="+top+", width=99, height=99, scrollbars=no, status=no, resizable=no");
}
if (wins >= 2){
var wintwo = window.open("","","left="+left+", top="+top+", width=99, height=99, scrollbars=no, status=no, resizable=no");
}
if (wins >= 3){
var winthr = window.open("","","left="+left+", top="+top+", width=99, height=99, scrollbars=no, status=no, resizable=no");
}
if (wins > 3){
document.status="!Only 3 windows allowed!";
}
winone.focus();
var widthspeed=speed
var heightspeed=speed/1.333333
if (wins >= 3){
var onego = 99+spacing
var twogo = 99
var thrgo = 99+spacing
}
if (wins == 2){
var onego = 99+(spacing/2)
var twogo = 99-(spacing/2)
}
if (wins == 1){
var onego = 99
}
var goiup = 0
for (goiup; goiup <= onego; goiup += heightspeed)
{
winone.moveTo((window.screen.availWidth/2)-(99/2), ((window.screen.availHeight/2)+goiup))
goiup += heightspeed
}
}
}
</script>
</head>
<body>
<input type="button" onClick="xopen('3','1','1','50')">
</body>
</html>
PLEASSE HELP.
I'm going insane with this thing... (*Thinks*)
*More insane.
Ta
D2K2
Comment