[thelist] JavaScript: focus on another window

Tab Alleman talleman at autobex.com
Wed Dec 13 17:28:06 CST 2000


well, I don't know if there are other ways, but this did the trick:

	function FullScreen(url)
		{
		var fs = window.open(url, 'B', 'resizable');
		fs.focus();
		return true;
		}
	...
onclick="FullScreen('foo.html')"

(in case anybody was curious)


-----Original Message-----

oh yeah, the solution need only work in IE 5+, if that helps...

(still looking through O'Reilly)

----------------------------------

I'm trying to write an onclick handler in a window named 'A' that will set
focus on an already-open window named 'B', but haven't been able to figure
it out yet.  I've tried:

window['B'].focus();
navigator.window['B'].focus();
navigator.B.focus();
B.focus();

all of which return a "..is not an object" error.  So what's the magic word
that I'm missing here?



---------------------------------------
For unsubscribe and other options, including
the Tip Harvester and archive of TheList go to:
http://lists.evolt.org Workers of the Web, evolt ! 


---------------------------------------
For unsubscribe and other options, including
the Tip Harvester and archive of TheList go to:
http://lists.evolt.org Workers of the Web, evolt ! 





More information about the thelist mailing list