[thelist] Bringing windows to the foreground with javascript

Bart Johnston 00217289 at bigred.unl.edu
Thu, 20 Jan 2000 15:18:36 -0600


hey all,

I have a quick javascript question that's been buggin me for a while.  I'm
building an online training site, and on this site there are terms that the
user can view definitions for in a popup window.  But I want to make sure
that if they leave the definition window open in the background (hidden by
the main browser window), that the definition widow will come back to the
foreground if they click on another term.  I thought that I would be able to
use focus(), but I'm pretty sure I'm getting nowhere with it.

Here is the function as it is now:

function term(word)  {

 var file2open = "../glossary/" + word + ".htm";
 terms=window.open(file2open,'terms','<options>');

}

and here is the funtion call:

<a href="javascript:term('recombinant');terms.focus()>recombinant</a>


Any help would be greatly appreciated (my grasp of javascript isn't what it
should be).  Thanks in advance.


Bart Johnston
Archrival Inc.
Digital Design & Communication
www.archrival.com