[thesite] Wanted: beta testers for new d.e.o. feature

Simon Coggins ppxsjc1 at unix.ccc.nottingham.ac.uk
Fri Sep 7 11:02:34 CDT 2001


> I'd tweaked my mozilla preferences to restrict sites from opening new
> windows, so I had to reinstall my default prefs file.
> 
> Once that was done, it worked fine. Would there be any way of getting it
> to fail to the current browser window if someone has their browser set
> up like this?

It all depends on if I can detect the absence of support for the
window.open method. If so I could do something along the lines of:

if (window.open) {
	window.open(newurl);
}
else {
	document.location.href = newurl;
}

Without checking I don't think the above code would work (since open is a
method) but I will experiment further. Maybe something like:

if (!window.open(newurl)) {
	document.location.href = newurl;
}

would work instead (assuming window.open() returns false if it fails,
rather than throwing an error).

Okay, enough of my rambling. In short I'll look into it and see what I can
do.

Simon






More information about the thesite mailing list