Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

getting variables from window

Status
Not open for further replies.

ramblenman

Technical User
Joined
Sep 27, 2003
Messages
14
Location
CA
I have a frame set. in this frame set I have 2 frames.
I have all of my variables loaded into the frameset so I can use them in both frames.
I have decided to add a new window with an on click( opens a new window, leaves the other one open).
Is it posible to get variables out of the frameset and put them in the new window ?
 
a single way to do it is to replace the standard "window.open" call by a "window.showModalDialog" or "window.showModelessDialog" (depending on if you want to lock parent window access or not).
The main advantage of these methods on the standard "window.open" one is that their arguments are the following :
- Url of page to show
- free string argument
- window ornaments.

What is interesting here is the second argument.
Fill it with all variables value you need (separated by pipes for exemple).
In called window, you can access them by "window.dialogArguments" then use the split method to separate them.

Hope that help.

Water is not bad as long as it stays out human body ;-)
 
This should work.

Code:
var newVar = opener.parent.someVar

opener refers to the frame that launched the new window. parent refers to the frameset from which the frame resides.

ToddWW
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top