Click to See Complete Forum and Search --> : Is it possible to find out if a document is done loading?
Enselic
09-16-2003, 10:33 AM
I'm wondering if it is possible to find out weahter a document has been finnished to load.
For istance:
if( document.isLoaded )
or something.
A DOC method is preferable, but not necessary. Thanks for any help.
Khalid Ali
09-16-2003, 10:35 AM
try using this
<body onload="alert('Document load complete');">
Enselic
09-16-2003, 11:35 AM
I'd like to get the loading state of an iframe from within the document in where the iframe is, if that is possible.
Khalid Ali
09-16-2003, 11:54 AM
iframe tag does not have an onload event,what you can do is have the onload body event in the src document that you will load in the iframe and you can access any function,varaible in the src document from the parent page,however, the src page have to be served from the same domain.
Enselic
09-16-2003, 01:23 PM
That could be a solution I guess.
However, I want things to be clean, so adding an onLoad event in every .htm is not a good way. It becomes unnessecarily complicated if I'm going to add another menuitem.
Maybe I'm too breif, this is the situation...
I have a HTML-doc called menu.htm in which I have several menuitems. There's also an iframe in which I view the selected .htm. Take a look at www.enselic.tk and you'll get it.
I want a single function on the menupage to load and resize the iframe. To know when I'm going to set the size I need to know when the document is fully loaded so scrollHeight is correct.
Enselic
09-17-2003, 02:05 AM
*bump*
Could someone confirm that it is impossible, please?