Home All Groups Group Topic Archive Search About

Control the size and position of a popup window.

Author
22 Mar 2005 11:15 PM
Jensen bredal
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

Author
23 Mar 2005 5:27 PM
CAC
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");
}

Show quoteHide quote
"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
>
>
>
Are all your drivers up to date? click for free checkup

Author
23 Mar 2005 7:18 PM
Jensen bredal
>>
>> 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?

Bookmark and Share