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

Calling a function in another window 1

Status
Not open for further replies.

NiceButDim

Programmer
Feb 12, 2002
154
GB
Hi,
I don't know much about javascript and I have what I hope is a simple question;
I have a web page made up of 2 frames. I want javascript in the second window to call a javascript function in the first window.
Assuming that it's possible, can anyone tell me how.
Thanks.

john.
 
[1] top page include an iframe named "a" (attribute name="a") and another iframe named "b" (attribute name="b").
[2] In iframe named "a" loaded a page containing a function x().
[3] In iframe named "b" loaded a page containing a function y().
[4] In iframe "b", the line calling its function y() would be simply like this.
[tt][blue]y();[/blue][/tt]
[4.1] In iframe "b" the line calling the function x() in iframe "a" would be like this.
[tt][blue]top.frames["a"].x();[/blue][/tt]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top