This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Stan James
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a line like this in a copule pages:

newWindow =,"windowname");

If I run this once it opens a new window. Per this page if I make the call again without closing the new window, it activates and reloads the same window again. This is nice.

I have code in the opened window to send data back:

window.opener.method( the data );

I open page 1 in an IFrame and open window X. It does some stuff and calls back to opener. Well & good. I close page1 and open page2. Page2 also opens window X and since it already exists it just activates the existing one. Good. Then window X references window.opener and it's no good. Makes sense.

So (finally) I changed my open to this:

newWindow =,"windowname");
newWindow.opener = window

This seems to work but I'm a bit surprised that opener was not read only or something. Does this sound kosher? Should I expect it to work?
I agree. Here's the link:
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic