SunQuest
           HTML Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsWeb DesignHTML Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old June 28th, 1999, 01:20 PM
terrywright
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
I need a way to verify whether a window is
already open before writing to it to prevent the script from reopening the frame file and wiping out the associated history files. So far I have had no luck with checking for the window name.

Reply With Quote
  #2  
Old June 29th, 1999, 09:51 AM
webcoder
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:

Two possibilities...

1- You could write a cookie when you open the window and check for the cookie each time you want to write to the window. Don't forget to change the cookie when you close the window.

2- Look at pages 176-178 of "The Javascript Bible" by IDG Books. It gives an explanation of the window 'close' property. I don't have time right now - there's alot involved.


------------------
Matthew J. Flynn
http://webcoder.net

Reply With Quote
  #3  
Old October 28th, 1999, 08:35 AM
MikeBethany
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
You can use the "closed" property of a window.

For instance:

var winTest = window.open("whatever.html");
if (winTest.closed)
alert("Window Closed");
else
alert("Window Open");

You can also use this on the window.opener object:

if (window.opener.closed)
alert("Window Closed");
else
alert("Window Open");


The problem I've run into is if you open a window, then go back to the opener window and change URL's. Then try to access the window.opener object from the opened window, you no longer have access.




------------------
"It's not where you're from, it's where you're at." S. Dogg

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignHTML Programming > Verifying a window is open before writing to it


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway