I'm trying to use a popup window script that opens the new window to a
specific X,Y coordinate... I'm pretty sure that the window.screenX and
window.screenY properties are the answer, but I'm having very little success
in making this all work in both IE and NS.
Here's my code as it stands today:
function windowOpen3(URL, windowW, windowH) {
strWindow =
'toolbar=no,status=no,scrollbars=no,location=no,me nubar=no,directories=no,re
sizable=0,size=yes,width=' + windowW + ',height=' + windowH +
'screenX=100,screenY=100'
window.open(URL,'hwWindow',strWindow)
}
IE is ignoring the X,Y coordinates completely and opening the new window so
far over to the right that half of it is off-screen and NS is picking up the
screenY setting but ignoring screenX.
Am I missing something here? Please help, and TIA.
Stanman 4 2134
"Matt Stanley" <ms******@hwcs.com> writes: 'toolbar=no,status=no,scrollbars=no,location=no,me nubar=no,directories=no,re sizable=0,size=yes,width=' + windowW + ',height=' + windowH + 'screenX=100,screenY=100'
.... IE is ignoring the X,Y coordinates completely
Yep. They never claimed to understand it.
<URL:http://msdn.microsoft.com/workshop/author/dhtml/reference/methods/open_0.asp>
NS is picking up the screenY setting but ignoring screenX.
Missing "," before "screenX".
Am I missing something here? Please help, and TIA.
I recommend using "left" and "top" instead of "screenX" and "screenY".
These properties seem to work in all browsers since Netscape 4 (do tell
me if you find exceptions :)
<URL:http://www.infimum.dk/HTML/JSwindows.html#ref_3_2>
While it is not documented by Netscape, "left" and "top" it seems to
be supported from (at least) Netscape 4.08.
(<URL:http://devedge.netscape.com/library/manuals/2000/javascript/1.3/reference/window.html#1202731>)
I doesn't work in Netscape 3, but that's not really a problem any more.
Actually, I recommend aginst trying to position windows at all. In MDI
browsers or dual-monitor displays, it can be quite disruptive, and in other
browsers, it's usually not needed.
<URL:http://www.infimum.dk/HTML/JSwindows.html#ref_3_3>
/L
--
Lasse Reichstein Nielsen - lr*@hotpop.com
DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleDOM.html>
'Faith without judgement merely degrades the spirit divine.'
Matt Stanley said: I'm trying to use a popup window script that opens the new window to a specific X,Y coordinate... I'm pretty sure that the window.screenX and window.screenY properties are the answer, but I'm having very little success in making this all work in both IE and NS.
Here's my code as it stands today:
function windowOpen3(URL, windowW, windowH) { strWindow = 'toolbar=no,status=no,scrollbars=no,location=no,m enubar=no,directories=no,re sizable=0,size=yes,width=' + windowW + ',height=' + windowH + 'screenX=100,screenY=100' window.open(URL,'hwWindow',strWindow) }
IE is ignoring the X,Y coordinates completely and opening the new window so far over to the right that half of it is off-screen and NS is picking up the screenY setting but ignoring screenX.
Am I missing something here? Please help, and TIA.
You're missing a comma before "screenX".
You've invented an attribute named "size".
IE ignores screenX and screenY, expecting left and top, instead.
You don't need to list attributes that are set to "no", since that
is the default if you specify values for any other attributes:
function windowOpen3(URL, windowW, windowH) {
strWindow = 'width=' + windowW + ',height=' + windowH
+ ',screenX=100,screenY=100,top=100,left=100';
window.open(URL,'hwWindow',strWindow);
}
Thanks so much for your help! That TOTALLY worked. It's always nice when
developers help each other; you guys both just made my day!
"Lasse Reichstein Nielsen" <lr*@hotpop.com> wrote in message
news:ad**********@hotpop.com... "Matt Stanley" <ms******@hwcs.com> writes:
'toolbar=no,status=no,scrollbars=no,location=no,me nubar=no,directories=no,re sizable=0,size=yes,width=' + windowW + ',height=' + windowH + 'screenX=100,screenY=100' ... IE is ignoring the X,Y coordinates completely
Yep. They never claimed to understand it.
<URL:http://msdn.microsoft.com/workshop/a.../methods/open_
0.asp> NS is picking up the screenY setting but ignoring screenX. Missing "," before "screenX".
Am I missing something here? Please help, and TIA.
I recommend using "left" and "top" instead of "screenX" and "screenY". These properties seem to work in all browsers since Netscape 4 (do tell me if you find exceptions :) <URL:http://www.infimum.dk/HTML/JSwindows.html#ref_3_2>
While it is not documented by Netscape, "left" and "top" it seems to be supported from (at least) Netscape 4.08.
(<URL:http://devedge.netscape.com/library/...ipt/1.3/refere
nce/window.html#1202731>) I doesn't work in Netscape 3, but that's not really a problem any more.
Actually, I recommend aginst trying to position windows at all. In MDI browsers or dual-monitor displays, it can be quite disruptive, and in
other browsers, it's usually not needed. <URL:http://www.infimum.dk/HTML/JSwindows.html#ref_3_3>
/L -- Lasse Reichstein Nielsen - lr*@hotpop.com DHTML Death Colors:
<URL:http://www.infimum.dk/HTML/rasterTriangleDOM.html> 'Faith without judgement merely degrades the spirit divine.'
Thanks so much for your help! That TOTALLY worked. It's always nice when
developers help each other; you guys both just made my day!
"Lee" <RE**************@cox.net> wrote in message
news:bt********@drn.newsguy.com... Matt Stanley said: I'm trying to use a popup window script that opens the new window to a specific X,Y coordinate... I'm pretty sure that the window.screenX and window.screenY properties are the answer, but I'm having very little
successin making this all work in both IE and NS.
Here's my code as it stands today:
function windowOpen3(URL, windowW, windowH) { strWindow =
'toolbar=no,status=no,scrollbars=no,location=no,m enubar=no,directories=no,r
e sizable=0,size=yes,width=' + windowW + ',height=' + windowH + 'screenX=100,screenY=100' window.open(URL,'hwWindow',strWindow) }
IE is ignoring the X,Y coordinates completely and opening the new window
sofar over to the right that half of it is off-screen and NS is picking up
thescreenY setting but ignoring screenX.
Am I missing something here? Please help, and TIA.
You're missing a comma before "screenX". You've invented an attribute named "size". IE ignores screenX and screenY, expecting left and top, instead. You don't need to list attributes that are set to "no", since that is the default if you specify values for any other attributes:
function windowOpen3(URL, windowW, windowH) { strWindow = 'width=' + windowW + ',height=' + windowH + ',screenX=100,screenY=100,top=100,left=100'; window.open(URL,'hwWindow',strWindow); } This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Roberto Castro |
last post by:
I have some problems with the way I am showing the BLOB fields in the
Image web controls. It does work on my localhost though sometimes I
need to hit Refresh for the images to load properly....
|
by: Nita Raju |
last post by:
Hi,
I have to validate a textbox for date without using the validation controls.
So i had to use IsDate(). It's not working properly when i give "11//2004".
When i enter the above date it...
|
by: qbproger |
last post by:
I'm developing a plugin for some software. The previous version of the
software didn't require a start in directory to be set. This allowed
me to leave the working directory to the default in the...
|
by: RobertS |
last post by:
I'm trying to figure out what I need to do to configure IIS 5.1 on XP Pro to
work when referencing WebResources.axd.
For example, I have an aspx script that works fine when run from Visual Web...
|
by: BoBi |
last post by:
Hi,
See the following URL for the concerned page:
http://home.scarlet.be/kenya-belgium/list_2_en/a_kenyan_cat_and_a_belgian_cat.html
Clicking on "Menu" or "Publication" in the right upper...
|
by: JT |
last post by:
Here is the overall structure I will be referring to:
End-program
ProvideWorkFlow.dll
Forms and methods that properly manipulate calls to methods in
AccessUtils
AccessUtils (a web service)...
|
by: kamill |
last post by:
I have done a logout page for logout from admin section and provides a link to logout from admin section.Whenever i clicked on logout link it redirected to index.php of admin section......BUT when i...
|
by: damezumari |
last post by:
When a user logs in to my site http://iwantyourquestion.com I set
$_SESSION to true if his username and password are OK.
When he calls a page I check if $_SESSION is true. If it
not I ask him to...
|
by: rajasree |
last post by:
Hi all,
am doing a project in PHP. my javascript code is working properly in ie. But its not working in firefox. Please help me
my code is as follows;
<script language="javascript"...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
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
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
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...
|
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...
|
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,...
| |