Results 1 to 2 of 2

Thread: open a new maximized from a pop up menu

  1. #1
    Join Date
    Dec 2005
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default open a new maximized from a pop up menu

    Sir,

    How do i open a maximized window from a pop up menu , where the pop up menu is not allowed to resize and has a function for fixed width and height.

    Regards.

    Auro.

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Well, it really doesn't matter where you are opening from. To open a maximized window, involves two basic steps, to handle things in the two styles of browser that may be used to view your page. For most browsers, that can calculate the width and height of the new window's chrome as well as its specified dimensions and location "on the fly" but that may not allow you to resize an existing window, launch your new window like so:

    HTML Code:
    <a href="whatever.htm" target="_blank" onclick="window.open(this.href, '', 'location, toolbar, top=0, left=0, width='+screen.availWidth+', height='+screen.availHeight);return false;">Open Big Window</a>
    On the page that opens in this window, you need a script in the head to take care of details that some browsers cannot calculate on the fly. Fortunately, all such browsers that I know of will allow resizing and repositioning of open windows:

    Code:
    <script type="text/javascript">
    onload=function(){
    window.moveTo(0, 0);
    window.resizeTo(screen.availWidth, screen.availHeight);
    }
    </script>
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

Bookmarks

Posting Permissions

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