not in MSIE 5+
I wonder which browsers you're talking about. Mozilla
still has not fixed 3 bugs regarding this.
I wasn't thinking of any particular browsers, I know that there are
still plenty about that don't mind if a script attempts to position a
window off screen but I didn't want to disagree with Michael on the
point that they really shouldn't. As we were discussing centring windows
on the screen (presumably with the intention that they be visible) I was
more interested in demonstrating that a script with that intention might
still place a new window out of site and not be in a position to know
that it had done so, rather than getting into whether a script could
deliberately put a new window where it couldn't be seen.
I don't agree. There are cases where having 2 browser window is
more suitable than having 2 browser tabs. I can have 2 browser
instances, 2 browser windows side by side. How can you view 2
browser tab side by side?
You cannot view two browser tabs side by side. But that is what I was
getting at. If a design suggests that it would be suitable to have two
windows side by side but it is not possible to know with certainty that
two windows will be the outcome on the client then rather than worrying
about the best way of attempting to open windows (and inevitably
accepting that it is just not going to happen reliably) it might be
better to re-consider that design and attempt to come up with something
that would be meaningful in any browser.
As I see it, a design that want's to open a second window has to take
into account the possibility that the second window does not open (or is
immediately closed by an external pop-up blocker, detect those condition
and falling back), navigates within the current window and opens in a
tab instead of a distinct window, in addition to the desired outcome of
opening in a new window. So a design that suggests the opening of a new
window implies the need to cope with at least three distinct UI styles
and to come up with a script that can detect, and sensibly respond to,
the failure of the window.open call due to pop-up blockers, etc.
(something that, so far, has never been demonstrated to be possible).
If opening a new window implies an exponential increase in UI complexity
and necessitates a script that has never been written (and I, for one,
believe to be impossible) then maybe it would be more effective to
abandon multi-window designs and instead see how much can be achieved
within a single browser window.
I don't agree on the inaccurate point. I think overall they report
accurate info but there are compatibility difficulties: window.screenX,
window.screenY have no equivalent in MSIE. I.e.:
window.screenY in Mozilla != window.screenTop in MSIE
window.screenY in Opera 7 != window.screenY in Mozilla
On the accuracy point I was thinking of screen objects that report the
same values for avail/Width/Height as the values they report for
width/height (on, say, IceBrowser 5 and Opera versions < 7.02).
I agree that the relevance of such info is quite debatable
or at least largely over-evaluated.
I deeply believe that amateur website developers over-excessively
focus on issues that they can control and that they believe can
bring some value to their site. Positioning a popup fits perfectly
into their controlling mind. At the same time, they will gladly
remove window resizability, scrollbars (thinking they are not
needed but not considering many usability issues like increasing
font size), statusbar,etc.. and they will feel powerful at
controlling the website. It's sort of a macho-power-trip attitude.
(A definition of amateur that seems to include quite a number of people
who are trying to make a living from web site development) I would tend
to leave the "macho-power-trip" judgement until after the individual has
had a chance to react to having the issues pointed out. At least some of
these attitudes seem to be down to attitudes gained in unrelated areas.
Graphic designers trained for (and experienced with) designing for paper
and print. Programmers used to coding for consistent and predictable
environments where they expect to actively control the UI. Coming to
terms with working in a medium as fluid as a web page and programming
for an environment as inconsistent as web browser DOMs is not going to
happen over night.
They totally miss the point that these windows are (should be)
at the disposal of users. They over-concentrate on issues and
matters which should matter a lot less than content and suitable
design.
Yes, there is a lot of concentration on the wrong issues. To my mind
worrying about the positioning, sizing, re-sizing, etc. of new windows
or communicating between them once they exist are all issues that come
after the issues around opening windows with scripts, and especially
detecting and coping with the failure of the attempt. Until a reliable
strategy exists to address that issue everything that follows is of no
more than academic interest.
Richard.