Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    Regular Coder
    Join Date
    Aug 2002
    Location
    IN, USA
    Posts
    121
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Animated popup... Huge!

    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?
    Code:
      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
        }
      }
    Last edited by CRASH_OVERRIDE; 01-10-2003 at 11:24 PM.
    Just call me Crash...
    "Crash- and BURN!"
    -Cereal Killer

  • #2
    Regular Coder
    Join Date
    Jan 2003
    Posts
    867
    Thanks
    4
    Thanked 8 Times in 8 Posts
    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.

  • #3
    Regular Coder
    Join Date
    Aug 2002
    Location
    IN, USA
    Posts
    121
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Yes, I am
    Just call me Crash...
    "Crash- and BURN!"
    -Cereal Killer

  • #4
    Regular Coder
    Join Date
    Aug 2002
    Location
    IN, USA
    Posts
    121
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Just thought of something . 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.
    Just call me Crash...
    "Crash- and BURN!"
    -Cereal Killer


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •