Where new windows open

by "Steve Mount" <steve(at)saltyrain.com>

 Date:  Thu, 20 Feb 2003 15:36:24 -0500
 To:  <hwg-techniques(at)hwg.org>
  todo: View Thread, Original
I have a web app that opens up small browser windows by using the following
JavaScript function:

function index_openwindow(url,name,options)
{
  if (arguments.length < 3) return false;
  if (url == "") return false;
  if (name == "") return false;
  if (options == "")
    window.open(url,name);
  else
    window.open(url,name,options);
  return true;
}

Here is a typical use:

top.index_openwindow("wsticky.cgi","stickywin",top.winoptions(550,300));

(The winoptions() function returns a standard feature string, but allowing
variable window width and height - in this case 550x300. Typically, the JS
is run from a page inside a frame, and in the index.html file, the top,
lives the function.)

This application is designed for MS Internet Explorer 5 and above ONLY.  One
of our clients wonders how to make the pop-up windows always appear in the
same place.  This is something I never worried about in development, I
always just let MSIE open the window where ever it wanted to.  I'm not
really asking *how* to make a window open up in a certain location - I could
do that if I wanted to.

My real question is, does anyone know how MSIE decides where to open a
window?

-------------------------------------------------------------
Steve Mount, Software Engineer            steve(at)saltyrain.com
Home Site                            http://www.saltyrain.com
US Constitution Online          http://www.usconstitution.net

HWG hwg-techniques mailing list archives, maintained by Webmasters @ IWA

This page is part of a preserved archive of archives.hwg.org. The site is no longer active and its content is not maintained. For enquiries about this archive, write to archive(at)iwanet.org.