[KLUG Members] Javascript popup window?

Bruce Smith bruce at armintl.com
Thu Jul 28 09:23:55 EDT 2005


Short story:  I need to create a bookmark in Firefox on Win-XP that
launches a popup window.  So I created this URI a bookmark:

javascript:window.open("http://some.url/", "demo", "width=400, height=300");

However in XP, the popup window appears "under" the main window, making
it hard to get to.  How can I raise this window to the top???  I tried
calling focus() without any luck.

How can I make this a pop-up, not a pop-under?


Long story:  (if anyone cares)

In our training room we have a Win-XP PC connected to a VGA projector
and every desktop has a PC.  I wrote some PHP scripts in our intranet to
allow/cut-off internet access to the other PC's to force people to stop
playing on the internet and pay attention to the instructor.

The PHP script lives in a hidden URL only the instructor knows (I'm not
allowed to password protect the page!).  The problem is some of our
instructors bring up the PHP page without thinking, forgetting to turn
off the VGA projector, which displays the URL in the browser on the big
screen, and then anyone in the class can type it in that URL and turn
the internet back on.

So, I got the brilliant idea to make a bookmark to a popup window, which
doesn't display the URL, so I added the above javascript line as a
bookmark on the instructor's PC.

 - BS




More information about the Members mailing list