473,509 Members | 3,009 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Control the size and position of a popup window.



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
Nov 19 '05 #1
2 6572
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");
}

"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

Nov 19 '05 #2
>>
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?
Nov 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
18277
by: Noozer | last post by:
When using the WebBrowser control, is it possible to cause popup windows to appear within the WebBrowser control itself instead of a new window? This is what I've written in the NewWindow2 event,...
3
6668
by: coolsti | last post by:
I need some help here. I am making an application which allows a user to look at a series of picture files one at a time, and enter the outcome of various visual tests to a database. The...
9
2528
by: Viken Karaguesian | last post by:
Hello all, I just discovered this NG, so you'll probably be getting some questions that have been brewing inside me for a while :>) I'm just an amateur who enjoys making websites. I use...
16
3036
by: DFS | last post by:
If you're listening, I want the middle of the calendar (showing 1 month) to open below the cursor position. It currently opens just to the right and below the cursor position. I hunted through...
3
6799
by: MikeY | last post by:
Hi Everyone, I am working in C#, windows forms.My question is this. All my button dynamic controls properties are present and accounted for except for the"FlatStyle" properties. I can't seem to...
1
5398
by: Jorge Ponte | last post by:
hi I have a Web User Control (ascx) - lets call it "My_WUC" - in a Web form. In that WUC I want have a textbox and a button. I want to click on the button and open a popup (I use javascript for...
7
2029
by: Michael Turner | last post by:
Hi Guys I am in the process of developing a control, and will need it to "popup" on the users for on the press of a button ask for some input and then chuck the information back to the form....
5
2292
by: rockdale | last post by:
Hi, I tried to search web for an non-popup calendar control, (like javascript calendar) but could not find a good solution. Most solutions are popup another window and show the calendar, then...
4
1969
by: Ronald Raygun | last post by:
I have a form on an HTML page with the usual user name, email etc. I want to be able to display a popup window (callout?) when a text input control element is clicked. For example, for the form:...
0
7234
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7344
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7412
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7505
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5652
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4730
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3216
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3203
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1570
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.