473,418 Members | 4,547 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,418 software developers and data experts.

window position with window.open

F
I'm trying to open a window in a specific position of the screen with this
script:

window.open('window.htm','mywindow','width=250,hei ght=350,screenX=20,screenY
=100')

it works with Netscape 6.2 but Internet Explorer and Opera just seem to
ignore the XY coordinates.

Any idea on how to make it work?

Thanks!

F@bio
Jul 20 '05 #1
1 20993
"F@bio" wrote:
I'm trying to open a window in a specific position of the screen with this
script:

window.open('window.htm','mywindow','width=250,hei ght=350,screenX=20,screenY
=100')

it works with Netscape 6.2 but Internet Explorer and Opera just seem to
ignore the XY coordinates.

Any idea on how to make it work?

Thanks!

F@bio


Internet Explorer and Opera use "top" and "left" attributes instead of "screenY"
and "screenX". So for maximum browser compatibility, include them all:

window.open('window.htm','mywindow','width=250,hei ght=350,screenX=20,screenY=100,left=20,top=100');

More details at: <url:
http://msdn.microsoft.com/workshop/a...ods/open_0.asp />

I'd also strongly suggest you upgrade to Netscape 7.11, Netscape 6.2 has a
number of bugs which could make it appear that currently valid JavaScript isn't
working right.

--
| Grant Wagner <gw*****@agricoreunited.com>

* Client-side Javascript and Netscape 4 DOM Reference available at:
*
http://devedge.netscape.com/library/...ce/frames.html

* Internet Explorer DOM Reference available at:
*
http://msdn.microsoft.com/workshop/a...ence_entry.asp

* Netscape 6/7 DOM Reference available at:
* http://www.mozilla.org/docs/dom/domref/
* Tips for upgrading JavaScript for Netscape 6/7 and Mozilla
* http://www.mozilla.org/docs/web-deve...upgrade_2.html
Jul 20 '05 #2

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

Similar topics

1
by: Matt | last post by:
My problem is when the user click the submit button, it will launch another new window for the request page. I want to confirm we cannot use JavaScript open window functions to open a request page?...
2
by: dan | last post by:
This works in mozilla but I can't figure out why this won't work in IE. Say I have this html <html> header goes here header goes here
10
by: Shang Wenbin | last post by:
Hi, When I want to close the current window using window.close() in IE6.0, there will be a confirm box that: The web page you are viewing is trying to close the window. Do you want to close this...
1
by: Matt | last post by:
Hi I am looking for a way in C# to use a IntPtr handle to a (possibly unmanaged) windows form to get the current position of the window on the desktop. I have tried using Form.FromHandle( handle...
1
by: Regardt | last post by:
Microsoft windows .Net 2003 I have a mayor problem! My property window won't open. I tried using the dynamic help to open the property window, but with out success. (The dynamic help window...
1
by: Regardt | last post by:
Microsoft windows .Net 2003 I have a mayor problem! My property window won't open. I tried using to dynamic help to open the property window, but with out success. (The dynamic help window won't...
22
by: stephen | last post by:
I have created an order form that users javascript to create a new html document when the customers clicks the "print page" button. Once the new document has been created it then prints the...
3
by: dibakar | last post by:
Hello I want to open a window using Window.showModalDialog once i click inside of a TextBox.And that window need to come just under the TextBox,so that it seems to a same control. So,what...
5
by: kalyangvd | last post by:
Hi Guys, I am trying to get the Field Id from the Parent Window in the pop up window using window.opener ex: var var1 = window.opener.document.getElementById("text1").value; ...
2
by: kurt sune | last post by:
Hello, I have a weird problem, I hope someone can explain this for me. I have a webpage using masterpage. In it I create a popup window using this code: Dim js As String = "<script...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
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
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
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...

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.