473,395 Members | 1,919 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Is that window still open? Was it ever?

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?

Jul 23 '05 #1
2 1268
In article <11**********************@g44g2000cwa.googlegroups .com>,
ra*******@gmail.com enlightened us with...

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

Jul 23 '05 #2
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:
In article <11**********************@g44g2000cwa.googlegroups .com>,
ra*******@gmail.com enlightened us with...
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


Jul 23 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Jawahar Rajan | last post by:
All, I have a printer friendly page that is opened when a user clicks a link on my page to get the printer friendly version, How ever when they close out the printer friendly version and return to...
13
by: Kai Grossjohann | last post by:
It seems that Ctrl-N in Mozilla opens a new empty browser window. That's fine, I don't need to do anything about it. But Ctrl-N in IE appears to clone the current window. Is there a way to...
5
by: Mike | last post by:
In my previous post, I wrote: > ... > GOAL: (very simple) Provide a hyperlink which, when clicked, > calls a javascript function which opens a new URL. > ... > PROBLEM: The following code...
5
by: Richard Trahan | last post by:
I have an inscrutable problem with window.open. Consider the following code: var graphwin = window.open("","graphWin","height=400,width=400,resizable=yes"); It works perfectly in one place in...
32
by: Eli | last post by:
How can I POST a form into a new window where I control the size and other attributes of the new window? Also. Are there any implications, perhaps due to browser security (Interne Explorer?)...
1
by: ian.michel | last post by:
I have a parent window that pushes a new window object onto an Array with the following code : OpenChild() { //totalNumWindowsCreated is global totalNumWindowsCreated =...
18
by: Roger Withnell | last post by:
I open a new window from the current window to display maps. Several maps of different sizes can be displayed. The function is given the size of the map and adjusts the window size accordingly....
13
by: Seth Grimes | last post by:
Hello all, I want to open a window when a user leaves my site. I set up a function called by onUnload. To skip the window.open if the user hasn't left my site, I set a variable in my links and...
2
by: Joe D Williams | last post by:
Thanks for the link to: http://www.w3.org/TR/Window Reading further, it seems like some input is needed: 1.2. Not in This Specification * ISSUE-59: Should Window 1.0 include history?...
7
by: anthony.turcotte | last post by:
Hi, I've looked for a solution to this problem on google, read posts in this newsgroup and I still haven't found anything that could help me. Here's the scenario. 1. User accesses...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.