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!

iFrame Notifies Parent Window

Status
Not open for further replies.

GR1EVER

Programmer
Mar 6, 2003
23
US
Is there any way for a frame to send some sort of message to the parent window. Right now, I have this site I am making, and I want certain things to change in the parent window based on the current location of the iframe.

I know that from the parent window, you can check the URL of the iframe by doing window.frames[0].location.href but I want the pages that load in the frame to notify the parent want URL it is so that the appropriate changes in the parent window can be made. But I don't even need it to do that much for me. As long as I can get a page that loads in the frame to send some sort of message to the parent, the parent could detect that the frame contents have changed and re-collect the required information.

Any ideas? thanks.
 

You can call a function in the parent like this:
Code:
parent.functionName();
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top