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

Can one frame access elements in another?

Status
Not open for further replies.

wbj433s

Programmer
Aug 6, 2001
3
0
0
US
I have a frameset with two frames. What I want to do is access an element in frame 2 from a javascript in frame 1. Is this possible? I haven't found any similar posts or anything in my documentation that would indicate how to do this.

Essentially, I have a button in frame 1 which causes a new page to be loaded in frame 2. I want to check for the existance of an element in frame 2 as a way of verifying that the page actually loaded correctly. If there is another way to confirm that the desired page actually loaded in the 2nd frame, that'd solve my problems too.

Thanks in advance,
Beau Jackson
Software Developer
beau@ciswired.com

 
Yes, the parent document is the page that created the frameset, and both frames are chlidren of it. Assumming you named the first frame frame_1 and the seond frame_2 the pathing would look like this:

parent.frame_1.document.someobject.someproperty
parent.frame_2.document.someobject.someproperty

They can refer to each other taking advantage of their relationship to the parent frameset.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top