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

Setting variables

P: 1
Hi,

I have a main window that opens another window, that i would like to have as "datastorage". The second window will have variables that should be set from the first window.

Finally I would like to be able to read the variables from window two from a third window (as well as from the first).

I haven't found out how this is done in javascript. Anyone can give a short simply example?

Thanks
Jörgen
Nov 25 '07 #1
Share this Question
Share on Google+
1 Reply


gits
Expert Mod 5K+
P: 5,390
hi ...

welcome to TSDN ...

you would have different possibilities ... when opening a window you may store a reference in the opening window:

Expand|Select|Wrap|Line Numbers
  1. var win_ref = window.open(...);
now you may refer to the new window's variables with win_ref.var_name ...

in case you want to retrieve values in the opened window from its opener then you simply may use the opener-property:

Expand|Select|Wrap|Line Numbers
  1. window.opener.var_name;
kind regards
Nov 26 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.