Vincent van Beveren wrote:
<snip>
There is no such place (as far as I know). There are some window-tricks
that you might be able to use. See the script below:
<snip>
function openIfNotExist(url, name) {
win = window.open("", name, "width=300,height=200");
Even if the window with the corresponding name is open this will result
in it being loaded with the URL specified in the window open call
(subject to the availability of a window.open method on the UA in
question and pop-up blockers not being in operation on the client
computer). Generally a URL specified as an empty string will be taken
as 'about
:blank', though not always, with alternative such as
'opera:balnk' having been previously observed in the wild.
(incidentally, code posted to Usenet should be indented with sequences
of space characters (two to four, are suggested) as any newsreader's
representation of a tab character is an unknown quantity, ranging from
zero space (no-indentation) to values equivalent to 8 spaces or
greater, making lines wrap and rendering code hard to read.)
if ('' + win.location == "about:blank") {
Having opened the window with an empty string as the first argument
this is almost certain to be true (while occasionally being false in
circumstances which are equivalent to 'about
:blank').
It also seems more reasonable to be reading the - location - object's -
href -property, which is a string, than to be type-converting the -
location - object into a string by concatenating it to an empty string.
win = window.open(url, name);
<snip>
It would be more reliable, and no worse, to just pass the URL argument
into the initial call to - window.open -, as even if the URL argument
is the current URL of a page being displayed in that window the
transition through 'about
:blank' will necessitate the re-loading of
that page.
Richard.