Control the size and position of a popup window.

Discussion in 'ASP .Net' started by Jensen bredal, Mar 22, 2005.

  1. Hello,I lunch a popup window from an aspx file .
    The javascript uses window.open .
    The problem is that the height parameter appears to have a limit and i
    cannot go below that limit.
    code below:


    function Openwindow( postBack)

    {


    popUp = window.open('AfMedarbejder.aspx' ,

    'test',

    'width=screen.width,height=15,left=0,top=700,');

    }

    height remains approximately 100 no matter what .



    Can someone explain what i'm doing wrong?



    I also want my window to remain on top always.

    How di i do this?



    Many thanks in advance

    JB
     
    Jensen bredal, Mar 22, 2005
    #1
    1. Advertising

  2. Try this... You can of course set the appropriate options to make the new
    window do whatever you like by way of the DOM. My snippet below should center
    the popup window on the screen.

    //Open aspx page in new window

    function popup()
    {
    var popup_width=685
    var popup_height=450
    var screen_width=window.screen.width
    var screen_height=window.screen.height
    var popup_left=Math.round((screen_width-popup_width)/2)
    var popup_top=Math.round((screen_height-popup_height)/2)

    window.open("TARGET_URL_GOES_HERE +
    "","","height="+popup_height+",width="+popup_width+",menubar=0,resizable=no,left="+popup_left+",top="+popup_top+",scrollbars=no,status=no,titlebar=no,toolbar=no");
    }

    "Jensen bredal" wrote:

    >
    >
    > Hello,I lunch a popup window from an aspx file .
    > The javascript uses window.open .
    > The problem is that the height parameter appears to have a limit and i
    > cannot go below that limit.
    > code below:
    >
    >
    > function Openwindow( postBack)
    >
    > {
    >
    >
    > popUp = window.open('AfMedarbejder.aspx' ,
    >
    > 'test',
    >
    > 'width=screen.width,height=15,left=0,top=700,');
    >
    > }
    >
    > height remains approximately 100 no matter what .
    >
    >
    >
    > Can someone explain what i'm doing wrong?
    >
    >
    >
    > I also want my window to remain on top always.
    >
    > How di i do this?
    >
    >
    >
    > Many thanks in advance
    >
    > JB
    >
    >
    >
     
    =?Utf-8?B?Q0FD?=, Mar 23, 2005
    #2
    1. Advertising

  3. >>
    >> Many thanks in advance
    >>
    >> JB
    >>
    >>
    >>


    I have the same problem as before.

    Height stay the same when it is set to a certain value.
    Could this be a setting in IE?
     
    Jensen bredal, Mar 23, 2005
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?QUNhdW50ZXI=?=

    set window size and position

    =?Utf-8?B?QUNhdW50ZXI=?=, Dec 21, 2004, in forum: ASP .Net
    Replies:
    5
    Views:
    20,760
    Patrice
    Dec 22, 2004
  2. =?Utf-8?B?Sm9obiBXYWxrZXI=?=

    Popup Window Popup Timing

    =?Utf-8?B?Sm9obiBXYWxrZXI=?=, Nov 4, 2005, in forum: ASP .Net
    Replies:
    3
    Views:
    865
    =?Utf-8?B?Sm9obiBXYWxrZXI=?=
    Nov 4, 2005
  3. James Wong
    Replies:
    4
    Views:
    515
    James Wong
    Jul 14, 2004
  4. Jens Peter Hansen
    Replies:
    7
    Views:
    560
    Randy Webb
    Jun 19, 2004
  5. Raffi
    Replies:
    4
    Views:
    241
    Dr John Stockton
    Aug 12, 2004
Loading...

Share This Page