473,405 Members | 2,294 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,405 software developers and data experts.

Opening new browser window in 2nd monitor?

Hi,

Is there any way to specify which monitor a Window.open() will launch a
new browser window in on systems with more than one display. It would
only need to work with Mozilla browsers, and not IE. Thanks!

Sep 7 '05 #1
10 11544
sa*********@yahoo.com wrote:
Is there any way to specify which monitor a Window.open() will launch a
new browser window in on systems with more than one display.


No (well, short of knowing, in advance, the pixel location that monitor
starts at - but EUGH)..

--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is
Sep 7 '05 #2
sa*********@yahoo.com said the following on 9/7/2005 5:01 PM:
Hi,

Is there any way to specify which monitor a Window.open() will launch a
new browser window in on systems with more than one display. It would
only need to work with Mozilla browsers, and not IE. Thanks!


And how, please tell, would you be able to tell whether I had 1, 2, 3 or
4 monitors?

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Sep 7 '05 #3

"David Dorward" <do*****@yahoo.com> wrote in message
news:df*******************@news.demon.co.uk...
sa*********@yahoo.com wrote:
Is there any way to specify which monitor a Window.open() will launch a
new browser window in on systems with more than one display.


No (well, short of knowing, in advance, the pixel location that monitor
starts at - but EUGH)..


That would only work for spanned displays... not true independent
resolutions.

There really isn't any way to deal with this... for the most part JavaScript
only "knows" about the primary screen (screen sizes will always come back
from the primary screen for example).

Jim Davis
Sep 8 '05 #4
Jim Davis said the following on 9/7/2005 8:31 PM:
"David Dorward" <do*****@yahoo.com> wrote in message
news:df*******************@news.demon.co.uk...
sa*********@yahoo.com wrote:

Is there any way to specify which monitor a Window.open() will launch a
new browser window in on systems with more than one display.


No (well, short of knowing, in advance, the pixel location that monitor
starts at - but EUGH)..

That would only work for spanned displays... not true independent
resolutions.

There really isn't any way to deal with this... for the most part JavaScript
only "knows" about the primary screen (screen sizes will always come back
from the primary screen for example).


That's not entirely true. My browser reports, for screen width, the
total width of my monitors. Which varies based on how I have them
arranged. I can make them horizontal or vertical or a square.

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Sep 8 '05 #5
Randy Webb a écrit :
sa*********@yahoo.com said the following on 9/7/2005 5:01 PM:
Hi,

Is there any way to specify which monitor a Window.open() will launch a
new browser window in on systems with more than one display. It would
only need to work with Mozilla browsers, and not IE. Thanks!

And how, please tell, would you be able to tell whether I had 1, 2, 3 or
4 monitors?


Randy, we all know that you have 5 monitors. Everybody knows that. :)

Gérard
--
remove blah to email me
Sep 8 '05 #6
Gérard Talbot said the following on 9/8/2005 12:19 AM:
Randy Webb a écrit :
sa*********@yahoo.com said the following on 9/7/2005 5:01 PM:
Hi,

Is there any way to specify which monitor a Window.open() will launch a
new browser window in on systems with more than one display. It would
only need to work with Mozilla browsers, and not IE. Thanks!


And how, please tell, would you be able to tell whether I had 1, 2, 3
or 4 monitors?


Randy, we all know that you have 5 monitors. Everybody knows that. :)


I have a setup at work that has 8, they paid a bundle for it. At home, I
have 2 but I want 2 more but the bucks just make it, well, prohibitve.
But the issues are the same.

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Sep 8 '05 #7
"Randy Webb" <Hi************@aol.com> wrote in message
news:cs********************@comcast.com...
Jim Davis said the following on 9/7/2005 8:31 PM:
"David Dorward" <do*****@yahoo.com> wrote in message
news:df*******************@news.demon.co.uk...
sa*********@yahoo.com wrote:
Is there any way to specify which monitor a Window.open() will launch a
new browser window in on systems with more than one display.

No (well, short of knowing, in advance, the pixel location that monitor
starts at - but EUGH)..

That would only work for spanned displays... not true independent
resolutions.

There really isn't any way to deal with this... for the most part
JavaScript only "knows" about the primary screen (screen sizes will
always come back from the primary screen for example).


That's not entirely true. My browser reports, for screen width, the total
width of my monitors. Which varies based on how I have them arranged. I
can make them horizontal or vertical or a square.


I should have have said "display" not screen (which is the wrong word for
this)... of course JavaScript doesn't know anything about "Screens" (or if
you even have a monitor) just about defined "displays". I'll bet in your
case these aren't independent displays.

There are two general multi-monitor display options available:

1) Spanned display: this option "stretches" your desktop across multiple
monitors. Although there ARE multiple monitors applications actually only
see one primary display (with an odd resolution). Most spanned displays are
limited to the same resolution and color depth on all monitors. Although
you have multiple monitors you have only one "display" (the primary one)
stretched across them - and JavaScript sees only that.

2) Independent displays. In this case each monitor can have the independent
color depth and resolution. You can, for example, have a 1024x1280 primary
display in true color paired with a secondary 1024x768 secondary display in
16 bit color. Again, JavaScript (on all platforms I've seen) only returns
information on the primary display even if the browser window is currently
on the (smaller) secondary display.

It would be nice if the scripting engine could return, instead, an array of
display information which each element being a collection of screen
information (thus an array of three elements would represent three
independent displays). In this vein a way to retrieve which of these
displays is the current "home" of the browser would be nice as well.

Jim Davis
Sep 8 '05 #8
On Thu, 8 Sep 2005 10:35:18 -0400, Jim Davis wrote:

Firstly, sorry for my english...

[cut]
2) Independent displays. In this case each monitor can have the independent
color depth and resolution. You can, for example, have a 1024x1280 primary
display in true color paired with a secondary 1024x768 secondary display in
16 bit color. Again, JavaScript (on all platforms I've seen) only returns
information on the primary display even if the browser window is currently
on the (smaller) secondary display.


I've Windows 2000, and that's true for Internet Explorer, but not for
Firefox for example. Firefox returns the information about the display
where the browser window is located.

--
~ "Nell'anno 1969 è bastata la potenza di calcolo di due Commodore 64 per
mandare con successo una navicella sulla Luna. Nell'anno 2003 è
necessario un Pentium 4 a 2000 Mhz per far funzionare Windows XP.
Qualcosa deve essere andato storto."

Sep 8 '05 #9
"ZER0" <ze********@libero.it> wrote in message
news:77**************@ID-171124.news.individual.net...
On Thu, 8 Sep 2005 10:35:18 -0400, Jim Davis wrote:

Firstly, sorry for my english...

[cut]
2) Independent displays. In this case each monitor can have the
independent
color depth and resolution. You can, for example, have a 1024x1280
primary
display in true color paired with a secondary 1024x768 secondary display
in
16 bit color. Again, JavaScript (on all platforms I've seen) only
returns
information on the primary display even if the browser window is
currently
on the (smaller) secondary display.


I've Windows 2000, and that's true for Internet Explorer, but not for
Firefox for example. Firefox returns the information about the display
where the browser window is located.


Cool - the last time I tried in FF is was doing the same as IE.

Neat to know.

Jim Davis
Sep 8 '05 #10
Jim Davis said the following on 9/8/2005 10:35 AM:
"Randy Webb" <Hi************@aol.com> wrote in message
news:cs********************@comcast.com...
Jim Davis said the following on 9/7/2005 8:31 PM:
"David Dorward" <do*****@yahoo.com> wrote in message
news:df*******************@news.demon.co.uk.. .
sa*********@yahoo.com wrote:

>Is there any way to specify which monitor a Window.open() will launch a
>new browser window in on systems with more than one display.

No (well, short of knowing, in advance, the pixel location that monitor
starts at - but EUGH)..
That would only work for spanned displays... not true independent
resolutions.

There really isn't any way to deal with this... for the most part
JavaScript only "knows" about the primary screen (screen sizes will
always come back from the primary screen for example).
That's not entirely true. My browser reports, for screen width, the total
width of my monitors. Which varies based on how I have them arranged. I
can make them horizontal or vertical or a square.

I should have have said "display" not screen (which is the wrong word for
this)... of course JavaScript doesn't know anything about "Screens" (or if
you even have a monitor) just about defined "displays". I'll bet in your
case these aren't independent displays.

There are two general multi-monitor display options available:

1) Spanned display: this option "stretches" your desktop across multiple
monitors. Although there ARE multiple monitors applications actually only
see one primary display (with an odd resolution). Most spanned displays are
limited to the same resolution and color depth on all monitors. Although
you have multiple monitors you have only one "display" (the primary one)
stretched across them - and JavaScript sees only that.

2) Independent displays. In this case each monitor can have the independent
color depth and resolution. You can, for example, have a 1024x1280 primary
display in true color paired with a secondary 1024x768 secondary display in
16 bit color. Again, JavaScript (on all platforms I've seen) only returns
information on the primary display even if the browser window is currently
on the (smaller) secondary display.


In IE, with the browser in either "display" monitor, it reports the
total width of both displays which is 2560. The resolution setting on
each monitor is 1280x960, but, one is a 17" and one is a 19". So the
resolution actually appears different because of the difference in size
of monitor. Now, if I change the display on my right to 800x600 and drag
a browser window from one to the other, then it changes what I see on
each monitor to the resolution I have set.

What is wierd is that when I set one to 1280x960 and the other to
800x600, the screen.width and screen.height I get are 2080 (correct) and
height is - oddly enough - 1560. It seems that IE thinks it is stacked
in both directions.

That is WinXP and IE6 SP2.

It would be nice if the scripting engine could return, instead, an array of
display information which each element being a collection of screen
information (thus an array of three elements would represent three
independent displays). In this vein a way to retrieve which of these
displays is the current "home" of the browser would be nice as well.


Not sure I agree there, as I don't see what the browser needs to know
the dimensions of any display it is not on, even if there are 100 of
them. Why does it matter unless it has some way to know which display to
open it in and a way to open it there (even assuming that it *can* open
a second window).

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Sep 8 '05 #11

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

Similar topics

6
by: Edward King | last post by:
Hi! I am trying to achieve the following: I have a number of help pages (in the format help_nn.php where nn=helpid). I want to be able to open a particular help page by calling the function...
3
by: Clinton Goff | last post by:
I am attempting to write a javascript app that will open a second browser window, load a url, such as www.google.com (foreign url) and perform a <File-Save As> function on that window. I am able...
2
by: Mike May | last post by:
Hi IE6 Win2k The javascript FAQ describes how you can retain a reference to a window that you have opened and manipulate the window - focus on it or close it, viz: 4.10 How do I check to...
10
by: Simon Wigzell | last post by:
Is there any way to create and open a window in javascript so that links in other websites won't "steal" it? I've written a web page with a form for people to enter headlines and URLs from...
8
by: jrefactors | last post by:
I want to maximize the browser window when I open a new window. Now I do the following, but different monitor size will yield different width and height values. ...
2
by: Novice | last post by:
Hi all, as you can see from the subject, I'm try to use an asp:button to create a new browser window and output contents to new window But default if I do the Response.Write("..." The output...
3
by: Larry Bud | last post by:
Wanting to use a technology I saw for one of our apps. We have several apps that a user logs in at on the same page. The app is determined by a drop down. User credentials are checked,...
3
by: sohan | last post by:
hi I have hyperlink column in a datagrid. The column contains the name of a text file. I am able to appendthe full path of the file. The file is on D drive on the server. But on clicking on...
1
by: nashak | last post by:
Hello, I have a aspx page on which I have a button. In the click event method in code-behind I do some processing and now need to open a new window in another browser and pass a couple of...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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
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
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,...

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.