Re: Opening new browser window in 2nd monitor?



Jim Davis said the following on 9/8/2005 10:35 AM:

"Randy Webb" <HikksNotAtHome@xxxxxxx> wrote in message news:cs2dna5rwK5xK4LeRVn-ig@xxxxxxxxxxxxxx

Jim Davis said the following on 9/7/2005 8:31 PM:

"David Dorward" <dorward@xxxxxxxxx> wrote in message news:dfnm9o$m02$1$8302bc10@xxxxxxxxxxxxxxxxxxx


santiago538@xxxxxxxxx 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
.



Relevant Pages

  • Re: HD Freeview expensive at Richer Sounds.
    ... We thought it was amazing when we managed to display a ... get colour monitors and 8-bit graphics cards with the same resolution, ... I believe the black-and-white monitors cost of the order of 5,000 ... These were high-end displays. ...
    (uk.tech.digital-tv)
  • Re: Digital Osci and Logic Analyzer
    ... The higher sampling rates of the examples you ... would the o'scope display at 1 usec/div'n? ... time soon) and I have a probe that works properly with the ADC. ... however many samples are collected at whatever resolution ...
    (sci.electronics.design)
  • Re: monitor for macmini mb139ll/a
    ... $150 worth of cables. ... It would plug in, since that monitor uses DVI, but you would get the ... 2560x1600 native resolution of the display. ... You cannot get that resolution out of your Mac Mini. ...
    (comp.sys.mac.hardware.misc)
  • Re: Incorrect Rectangle dimensions using GDI+
    ... Plug and play monitors should report their physical size and resolution so ... that the system can adjust the output for WYSIWYG display. ...
    (microsoft.public.dotnet.framework.drawing)
  • Re: Retrieve NATIVE screen resolution
    ... Otherwise, if all else fails, google "Optimal Monitor Resolution". ... CRT type monitors don't have a native resolution. ... 'native' resolution is used by the display adapter. ... Other systems allow you to specify a range ...
    (microsoft.public.scripting.wsh)