Welcome to WebmasterWorld Guest from

Forum Moderators: open

Message Too Old, No Replies

Transporting javascript variables between windows

2:50 pm on Oct 12, 2001 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Sept 28, 2001
votes: 0

Hi everyone! I'm hoping someone out there can help me out a bit -

The problem is that I have a variable that I want to transport between 3 different windows. The variable is the window location. So in the first window I have:
var ref = self.location.href;
Now shortly after that statement, there's a bit more JS and then the window closes and opens a different window. In the new window there's a bit more scripting (detects screen size), and then another window opens with a frameset(to a window based on user screen size) and the previous window closes. I want one of the frames in the last window to be the original URL. So how can I transport the variable all the way to that point?

I mananaged to get it to work in IE5.5 - But in IE6,IE5, and NS6 it just opens up the frameset to the default page. In NS4, as usual, nothing works.

Basically, I'm doing this so that if someone bookmarks a page and then opens it outside of the frameset, the page will redirect and open itself again within the frameset (appropriate to the users screensize) so that everything is displayed properly.

I know a lot of us aren't big frame fans (for reasons like the problems I'm having now) but unfortunately scrapping the frames on this page is not an option. :(

Thanks for ANY help or suggestions...this is the best forum around!


4:26 pm on Oct 12, 2001 (gmt 0)

Senior Member

WebmasterWorld Senior Member tedster is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:May 26, 2000
votes: 0

For a shot at a pure javascript solution, check out these ideas:


As the man there says, it might be easier to set a cookie.


Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members