By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,619 Members | 1,692 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,619 IT Pros & Developers. It's quick & easy.

Popup reuse in FireFox

P: n/a
I am trying to reuse a popup in my application. The reused popup also
opens another popup. From this final popup I then try and reference a
function located in the window that origionally opened the reused
popup. This works fine in IE but doesn't in FireFox. Looking at the
code through the Javascript debugger in FireFox it tells me that the
reused popup's opener is closed even though it is still open. Is this
a bug with FireFox or just bad practice?

Thanks,

Aaron

Jul 23 '05 #1
Share this Question
Share on Google+
11 Replies


P: n/a
Aaron wrote:
reused popup's opener is closed even though it is still open. Is this
a bug with FireFox or just bad practice?


I can't reproduce something like that (Firefox 1.0.2/Win 32).

Here's a simple test case:
http://www.innoline-systemtechnik.de/dhgm/cascade.html

If you open multiple popups in that test case and don't close
any window along the way, don't you always get a list with the
window named "RootWindow" as the last entry?

ciao, dhgm
Jul 23 '05 #2

P: n/a
Dietmar,

Thanks for your quick reply. The example you posted is not quite what
I am having the problem with. In the example you posted if you made
Popup 2 open in the same window as Popup 1, then on Popup 2 open Popup
3 in a new window and then checked the opener of Popup 2 from Popup 3
you should get the same problem that I am having.

Aaron

Jul 23 '05 #3

P: n/a
My apologies I just set up a test similar to what you had done but with
the scenario I described in my origional posting. It looks like it
does work. Still not sure why it doesn't work in my application. I'll
have to keep digging.

Aaron

Jul 23 '05 #4

P: n/a
I think I am going crazy. :-) The example that I said did work in fact
DOES NOT work. I still do not have a
reference to the root window.
Sorry for the confusion, this bug is driving me nuts!!

A.

Jul 23 '05 #5

P: n/a
Aaron wrote:
I think I am going crazy. :-) The example that I said did work in fact
DOES NOT work.


Would you be able to post a link to that example?

ciao, dhgm
Jul 23 '05 #6

P: n/a
DU
Aaron wrote:
I am trying to reuse a popup in my application. The reused popup also
opens another popup. From this final popup I then try and reference a
function located in the window that origionally opened the reused
popup. This works fine in IE but doesn't in FireFox. Looking at the
code through the Javascript debugger in FireFox it tells me that the
reused popup's opener is closed even though it is still open. Is this
a bug with FireFox or just bad practice?


It is impossible to say without being able to actually examine the code
and test the page.

DU
--
The site said to use Internet Explorer 5 or better... so I switched to
Mozilla 1.7.6 :)
Jul 23 '05 #7

P: n/a
Here is the test I ran.

http://k.domaindlx.com/adunfield/PopupTest/

Thanks,

Aaron

Jul 23 '05 #8

P: n/a
Aaron wrote:
Here is the test I ran.

http://k.domaindlx.com/adunfield/PopupTest/


Try to replace
this.window.opener.window.parent.opener.Test();
with
if (opener && !opener.closed && opener.opener && !opener.opener.closed) {
opener.opener.Test();
}

or see a working (FF 1.0.2) example at
http://www.innoline-systemtechnik.de/dhgm/cascade2.html

And maybe you should also visit http://validator.w3.org.

ciao, dhgm
Jul 23 '05 #9

P: n/a
Dietmar,

Thanks again for your reply. I made the code changed you suggested and
I also ran my test pages through the validator you posted and fixed the
errors that I could and still no luck. I also tried the example you
posted but got the following error

Error: uncaught exception: Permission denied to get property
Window.name

I also checked my version of FireFox and I am running 1.0.2.

Thanks,

Aaron

Jul 23 '05 #10

P: n/a
Aaron wrote:
fixed the errors that I could and still no luck. I also tried the
example you posted but got the following error

Error: uncaught exception: Permission denied to get property
Window.name


Huh?

Did you use a freshly opened window (that had no opener coming from
another origin) for the test? That error normally indicates violation
of the same origin policy.

Would you re-check the example (I've added some error catching) and
tell what exactly is displayed in which window now?

ciao, dhgm
Jul 23 '05 #11

P: n/a
Dietmar,

This is what I get for your example,

This window is named Popup2.
The problem was reported for this document.

Popup2's opener is named 'Popup1' and it's closed property is set to
false.
Popup1's opener is named 'RootWindow' and it's closed property is set
to false.

Not sure if this means the test worked or not since it says there was a
problem reported for this document. Having said this, the example you
posted still isn't following the same steps, like I have done in my
example, to recreate the problem. In your example you have a link in
the root window that reuses the popup whereas in my example the link
that reuses the popup is located in the popup itself.

Thanks again,

Aaron

Jul 23 '05 #12

This discussion thread is closed

Replies have been disabled for this discussion.