Is that window still open? Was it ever?

R

Random

To grossly oversimplify my webapp:

I am using PHP to communicate with IMAP, outputting relevant
information as JavaScript. The information is aggregated in an
extremely heavily-scripted status display. This display is PHP
include()d in a larger document, with a link to open it in a new
window.

When opened in a new window, the popup communicates with the original
(now hidden) include()d version, provided that the original window is
still open and relevant.

For reasons of server load (we're talking thousands of emails a day in
most cases), only one should be refreshing the information. Hopefully
they maintain concurrency by the popup taking over the role of
refreshing the information, then propagating it to the 'plugin'.

Now... here's my problem:

What I'm trying to do is account for the possibility of someone opening
the popup and closing the main window (or nagivating away from the
site), then independently navigating BACK to the site.

I want to be able to scriptically determine if the popup window is
open, specifically when there is no parent-child relationship between
the popup and the window in which the code is being executed. I may be
able to accomplish this with JS-baked session cookies, but merely
knowing that the window is open isn't -really- what I'm after if I
can't communicate with it.

Ideas?
Can it even be done?
Did I even make sense?
 
K

kaeli

I want to be able to scriptically determine if the popup window is
open, specifically when there is no parent-child relationship between
the popup and the window in which the code is being executed.

Once the parent-child relationship is broken, you can't communicate between
the windows any more.
You'd have to set up a pretty hacked up solution where they communicate by
passing stuff to the server independently. Not really a solution, more than
likely.

If your windows are that dependent on each other, you may be after modal
windows instead. Or close the popup when the user exits the site. I've seen
both implementations as solutions to this problem, depending on the
application scope and target browsers.

--
--
~kaeli~
Synonym: the word you use in place of a word you can't
spell.
http://www.ipwebdesign.net/wildAtHeart
http://www.ipwebdesign.net/kaelisSpace
 
R

Random

Yeah, I was afraid of that. I don't want to use modal 'dialogs' because
I do want the windows to be opened/closed independently of each other.

I'll just use a JS-baked cookie to say when the popup is open and
consign its cache to the ether when it's closed in this case. I was
hoping to avoid the duplication of effort on the server-side, but if it
can't be done it can't be done.

Thanks, kaeli.
-R
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,020
Latest member
GenesisGai

Latest Threads

Top