Control the size and position of a popup window.

J

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
 
G

Guest

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");
}
 
J

Jensen bredal

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?
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top