A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: Maximized popup in the Middle, doen't work!

  1. #1

    Maximized popup in the Middle, doen't work!

    Hi!
    im using this script:


    <script type="text/javascript">
    <!--
    function popup(URL,width,height){
    if (parseInt(navigator.appVersion) >= 3){
    if (navigator.appName == "Netscape" && parseInt(navigator.appVersion)<5){
    var tools = new Packages.java.awt.Toolkit.getDefaultToolkit();
    screen=tools.getScreenSize();
    }
    x = screen.width; y = screen.height;
    }
    window.open(URL,"sidan","top=" + parseInt(y/2-height/2-16-20) + ",left=" + parseInt(x/2-width/2-5) + ",x" + width + ",y" + height);
    }
    -->
    </script>


    to open a popup window wich is supposed to calculate the screen size and positon itself i the middle, i also wnat it to maximize and use the hole available screensize.

    It works some times but not always, there's espessialy problems on widescreens (16:9) monitors like thoose on new notebooks!

    can annyone help me?
    om not that good at javascrip!

  2. #2
    /*
    <script type="text/javascript">
    <!--
    function popup(URL,width,height){
    if (parseInt(navigator.appVersion) >= 3){
    if (navigator.appName == "Netscape" && parseInt(navigator.appVersion)<5){
    var tools = new Packages.java.awt.Toolkit.getDefaultToolkit();
    screen=tools.getScreenSize();
    }
    x = screen.width; y = screen.height;
    }
    window.open(URL,"sidan","top=" + parseInt(y/2-height/2-16-20) + ",left=" + parseInt(x/2-width/2-5) + ",x" + width + ",y" + height);
    }
    -->
    </script>
    */

  3. #3

    THE LINK

    Here is the site:

    http://www.nybergsglas.se

  4. #4
    Annyone???? HELP!!!!

  5. #5
    noone that can help?

Posting Permissions

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




Click Here to Expand Forum to Full Width

HTML5 Development Center