...

View Full Version : Animted popup... Huge!



CRASH_OVERRIDE
01-10-2003, 10:18 PM
I wrote this script, I guess it's a bit bigger than it could be, but I dont look at size much. Does what I want it to
The problem is, when it first opens, it's HUGE. I specify it to be start out at only 100x100px in size, But it turns out to be well over 1024x768px in size. Any ideas why its so big?


var win=null;
var resize;

var maxx=160; //Max Width
var maxy=160; //Max Height

var width=100; //Initial Width
var height=100; //Initial Height

var left=50; //Position left
var top=50; //Position top

var x=10; //Growth rate width
var y=6; //Growth rate height

function openMode(mode){
if(mode!=''){
switch(mode){
case 'normal':
window.location='index.htm';
break;
case 'fullscreen':
window.open('index.htm','','fullscreen=yes');
break;
case 'popup':
win=window.open('index.htm','','width=100,height=100,scrollbars=yes,adress=no,status=no,location=no, resizable=no,directories=no,menu=no,top='+top+',left='+left);
resize=window.setInterval('resizex()',1);
break;
}
}
}
function resizex(){
win.resizeBy(x,0);
width+=x; //Grow x
if(width>=maxx){
window.clearInterval(resize); //Stop growth
width=100; //Reset Size
resize=window.setInterval('resizey()',1); //Start resizing y
}
}
function resizey(){
win.resizeBy(0,y);
height+=y; //Grow y
if(height>=maxy){
window.clearInterval(resize) //Stop growth
height=100; //Reset Size
}
}

arnyinc
01-10-2003, 10:54 PM
Are you sure you specify the right value for the "mode" variable? Maybe you accidentally have it opening te fullscreen window.

It works fine for me.

CRASH_OVERRIDE
01-10-2003, 11:27 PM
Yes, I am

CRASH_OVERRIDE
01-11-2003, 12:20 AM
Just thought of something :o. It works fine in Mozilla, but the problem is coming from IE. Crappy old Opera cant do anything worth a darn, I almost think its not worth developing for Opera.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum