views:

27

answers:

3

Is it possible to do at all..?

The goal of this is to load a heavy Flash movie, after the images, text, and contents of my page is finished loading...

Any solutions..?

More details: The Flash movie (a music mp3) is loaded in a frame (menuFrame) with the menu. The content (that needs to be loaded first) is in another frame (contentFrame)...

+2  A: 
$(window).load(function() {
    // this code runs after the page finished loading
});
Šime Vidas
What if the content that needs to be loaded first is in another frame..? Is it possible..? What would replace WINDOW in your example..?
pnichols
Do you mean frame or iframe?
Šime Vidas
A frame in a frameset... The website was build with frames, menu is in one frame and content in another...
pnichols
Oh, gosh... frames. I don't even remember what those are :) You should put that information in the title of your question...
Šime Vidas
+1  A: 

Try:

window.onload

or Jquery version:

$(window).load()

netadictos
+1  A: 

$(window).load() is exactly what you are looking for. The event fires when the whole page, i.e. the DOM plus all image resources, has loaded. From the docs:

The load event is sent to an element when it and all sub-elements have been completely loaded. This event can be sent to any element associated with a URL: images, scripts, frames, iframes, and the window object.

Pekka