[thelist] javascript help
Bob Schwartz
bob at fotografics.it
Mon Jun 27 02:47:01 CDT 2011
> Bob,
>
> Is this the sort of thing you want - not my code - I found ages ago and use
> it now and then for opening and closing windows.
> The closeWindow seems to have the bit of code you might use ....it checks to
> see if the window is open before closing it, you could add your own code in
> there.
>
> Cheers Simon
>
> var windowHandle = null;
> var windowHandle_closed = false;
>
> function openWindow() {
> windowHandle =
> window.open('http://www.example.com/','windowName','height=200,width=200');
> if (windowHandle_closed) {
> windowHandle_closed = false;
> }
> }
>
> function closeWindow() {
> if (windowHandle != null) {
> if (!windowHandle_closed) {
> windowHandle_closed = true;
> windowHandle.close();
> }
> }
> }
Thanks Simon, I'm sure that hidden in your code is the correct path to get where I want to go, but I'm too stupid when it comes to writing code to adapt it.
Bob
More information about the thelist
mailing list