Re: spawn window behind main window

by "Paul Wilson" <webguroo(at)tampabay.rr.com>

 Date:  Thu, 6 Dec 2001 09:57:14 -0500
 To:  "Blue Tapp" <blue(at)bluesarthouse.com>,
"HWG Basics" <hwg-basics(at)hwg.org>
 References:  BlueTapp
  todo: View Thread, Original
> I have searched and searched and cannot find the JavaScript to spawn a
popup
> window BEHIND the main window.  Can anyone help?  Also, what I would
prefer
> to have is a popup window that would only be spawned when the user leaves
my
> site to go elsewhere.  Can this be done?  (I know how to spawn a window
when
> a user leaves the page but I don't want that since it would become very
> quickly annoying.)

It can be done because I have seen it. I think I saw it at "one of THOSE
sites"  I was tricked into visiting and every time I closed a window - a new
one was spawned for yet another site. I didn't really look at the code, all
I wanted to do was get that stuff off my desktop before the wife clubbed me.
:-}

I am pretty sure it requires comparing the new Document Object Module URL
and a false condition probably triggers the pop-up.  The window.blur may be
used to start it.  Cookies may be worked in there also, not sure.

It's probably a simple piece of code, but I have noticed that most
JavaScript books are written to teach you JavaScript as a language - not to
teach you real productive stuff you might actually put to use.  They also
seem to have a decided Netscape slant, which is not very helpful in a
Micro$oft world.

 Another thing I see is that many JS programmers look at things like this
disdainfully and purposely leave it out.  Lastly I have recently ran across
several pieces of code used in a CGI shopping cart that are totally
undocumented anywhere.  Good Luck.

Paul Wilson
webguroo(at)tampabay.rr.com

HTML: hwg-basics mailing list archives, maintained by Webmasters @ IWA