Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Control the size and position of a popup window.

Reply
Thread Tools

Control the size and position of a popup window.

 
 
Jensen bredal
Guest
Posts: n/a
 
      03-22-2005


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


 
Reply With Quote
 
 
 
 
=?Utf-8?B?Q0FD?=
Guest
Posts: n/a
 
      03-23-2005
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
>
>
>

 
Reply With Quote
 
 
 
 
Jensen bredal
Guest
Posts: n/a
 
      03-23-2005
>>
>> 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?


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
mega pixels, file size, image size, and print size - Adobe Evangelists Frank ess Digital Photography 0 11-14-2006 05:08 PM
Where is Form Relative Position and Absolute Position in VS.Net 2005 ? Luqman ASP .Net 1 02-07-2006 10:27 AM
Adapt size of popup to its content's size? Daniel Fugmann Javascript 4 08-18-2004 03:47 PM
How to set position of a web control depending on other control's position at run-time? James Wong ASP .Net Web Controls 4 07-14-2004 10:24 AM
Main > Popup > Popup > Close popup AND new URL in main? Jens Peter Hansen Javascript 7 06-19-2004 08:56 PM



Advertisments