www.webdeveloper.com
Results 1 to 3 of 3

Thread: Window.open having size issues with different browsers

  1. #1
    Join Date
    Apr 2007
    Posts
    15

    Question Window.open having size issues with different browsers

    I'm using window.open to open a window with a video player. The window opens correctly in IE 8 and Firefox 26, but not in Safari 5.1.7 and Chrome Version 32.0.1700.72 m.

    Safari opens with being taller than IE and FF. Chrome still has the scroll bar at the bottom and cuts off the video tool

    This is the code i'm using
    <script>
    function WinPopUp(pURL, title,w,h) {
    var left = (screen.width/2)-(w/2);
    var top = (screen.height/2)-(h/2);
    var targetWin = window.open (pageURL, title, 'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no, width='+w+', height='+h+', top='+top+', left='+left);
    }
    </script>

    How can I make it open exactly the same for all four browsers?

    Thank you

  2. #2
    Join Date
    Mar 2009
    Posts
    469
    I know I'm stupid, but what is this [whatever]='+[whatever]+' thing? That totally confuses me. And why is there no closure of the single quote in --> left='+left); <-- in your code?

    I have not tried running this code myself but-- you aren't getting any errors about syntax with this code?

  3. #3
    Join Date
    Mar 2012
    Posts
    202
    The syntax looks fine. lol

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

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



Recent Articles