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

finding frame page load in a frameset

Status
Not open for further replies.

sharugan

Programmer
Jul 23, 2007
14
US
hi ,
i have a frameset that contains two frames.
1)content frame: i have access to this page
2)main frame : i don't have access to this page
I need to write a javascript in content frame to check for the page load in main frame since the main frame page takes much time to load the page.
when i use
if(window.frames['map'].document.readyState == 'complete')
{
}
I am getting not an object error.
I am also looking for script to be compatible across the browser.
 
How are you planning on writing javascript in the content page if you don't have access to it?

[sub]Never be afraid to share your dreams with the world.
There's nothing the world loves more than the taste of really sweet dreams.
[/sub]

Webflo
 
As dwarfthrower noted, you cannot write JavaScript exclusively within your content frame that will give you the status of the main frame.

The way to approach this (assuming you have a way to include JavaScript in the top-level window) is to write some code that is included in the common parent of both these frames. That window can examine status of both frames, and your content frame can call a function in the containing window this way
Code:
parent.checkFrameLoaded("mainFrameID")

(All function names are fictional.)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top