Connecting Tech Pros Worldwide Help | Site Map

Is that window still open? Was it ever?

Random
Guest
 
Posts: n/a
#1: Jul 23 '05
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?

kaeli
Guest
 
Posts: n/a
#2: Jul 23 '05

re: Is that window still open? Was it ever?


In article <1116681846.435689.297200@g44g2000cwa.googlegroups .com>,
randomiez@gmail.com enlightened us with...[color=blue][color=green]
>>[/color]
> 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.[/color]

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

Random
Guest
 
Posts: n/a
#3: Jul 23 '05

re: Is that window still open? Was it ever?


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


kaeli wrote:[color=blue]
> In article <1116681846.435689.297200@g44g2000cwa.googlegroups .com>,
> randomiez@gmail.com enlightened us with...[color=green][color=darkred]
> >>[/color]
> > I want to be able to scriptically determine if the popup window is
> > open, specifically when there is no parent-child relationship[/color][/color]
between[color=blue][color=green]
> > the popup and the window in which the code is being executed.[/color]
>
> Once the parent-child relationship is broken, you can't communicate[/color]
between[color=blue]
> the windows any more.
> You'd have to set up a pretty hacked up solution where they[/color]
communicate by[color=blue]
> passing stuff to the server independently. Not really a solution,[/color]
more than[color=blue]
> likely.
>
> If your windows are that dependent on each other, you may be after[/color]
modal[color=blue]
> windows instead. Or close the popup when the user exits the site.[/color]
I've seen[color=blue]
> 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[/color]

Closed Thread