Right, should have mentioned that. The same is true of pages in frames and iframes (though with different referencing). The point is that only loaded pages are active. You cannot reference info from pages that are no longer loaded; as in serial, rather than parallel pages. [ March 27, 2007: Message edited by: Bear Bibeault ]
Another way of doing this that I used to use in the olden days was to put a single frame inside the main page, and store the JS code in the frameset, so that the full visible page (i.e. the frameset) could refresh without the variables being lost.
From the frames, you'd refer to variables in the frameset as top.myVariable.
However, if you're writing an app that needs to maintain a lot of state and/or code on the client, you really ought to have a look at Ajax, which solves this problem in a much better way IMO, by allowing you to fetch data and/or content from the server without refreshing the page at all. Then all your JS variables can just be referred to straightforwardly.
Originally posted by Kevin Tysen: About var foo = window.opener.variableName;