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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

JavaScript

Status
Not open for further replies.

miltonravi

Programmer
Oct 6, 2000
2
IN
How to invoke a function in a window from an another window? [sig][/sig]
 
There are several ways to do this, depending on how you've set things up. The simplest is:

Let's say your original window has just opened a secondary window using 'window.open()'. From the secondary window, you can call a function in the primary window with 'window.opener.thefunctionname()'

If you want to run a command from the primary page to run a function on the window that was just opened, you need to use the name given to the window upon opening (one of the window.open() arguments). 'windowname.thefunctionname()' will do it in this case.

If your needs are more complex than this, I believe all current windows are available for scripting based on an array (window[0],window[1], or something like that) which will need a bit more research to implement. [sig][/sig]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top