advertisement
Login | Register   
  Include Code  Search Tips
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   TIP BANK
Browse DevX
Partners & Affiliates
advertisement
advertisement
Tip of the Day
Expertise: Intermediate
Language: JavaScript
July 29, 2008
Invoke a Parent Window Function from Another Window in JavaScript
Sometimes, you need to call a JavaScript function that's in a parent window from a child window. For example, suppose you wanted to update a field in the parent window when a user enters or selects some value in a child window.

You can achieve this using the window DOM object's window.opener property, which holds a reference to the parent window object model. After you have the parent window reference, you can access any functions, variables, or controls in the parent window.


It's quick, easy and you get access to all the articles on DevX.
This registration/login is to allow you to read articles on devx.com.
Already a member?





Deepak Choudhari
If you have a hot tip and we publish it, we'll pay you. However, due to accounting overhead we no longer pay $10 for a single tip submission. You must accumulate 10 acceptable tips to receive payment. Be sure to include a clear explanation of what the technique does and why it's useful. If it includes code, limit it to 20 lines if possible. Submit your tip here.
advertisement
advertisement