[thelist] javascript closing pop up windows

Chris Blessing webguy at mail.rit.edu
Fri Apr 26 09:42:01 CDT 2002


Well the only way to get around that confirmation box that pops up is to use
javascript to open the window like:

<A HREF="blah2.html" TARGET="_blank" onClick="popup('blah2.html'); return
false;">text</A>

This way you cover everyone: if they have JS enabled, the window will open
w/ the JS and they'll never see the confirm box.  If they don't have JS
enabled, the window will still open but they will get the confirm box.

BTW, there's an article on evolt which further explains this:

http://www.evolt.org/article/Links_and_JavaScript_Living_Together_in_Harmony
/17/20938/index.html

hth!

Chris Blessing
webguy at mail.rit.edu
http://www.330i.net

> Chris
>
> > I assume you're using something like <A TARGET...> to open
> > the window and
> > then you try to close it with JS right?
>
> yes the link is something like <a href="blah" target="_blank">blah</a> and
> then the page is closed with window.close().
>
> Is there a better way of doing it?
>
> J.
>




More information about the thelist mailing list