View Full Version : javascript tracking of page / iframe loading
noisearchitect
08-04-2003, 09:46 AM
Hi, long time to see to all. I want to know if its possible to track the loading of a page or an iframe using javascript. This would be similar to preloading images, and tracking when the images have loaded (however, I need something to check the loading of 1 item, or of the different components of the iframe (which isn't made up of pictures :0)). The eventual goal is to have a loader bar for an iframe.
I can't find anything on google about it so I'm guessing not. What about others, like asp/php (i don't know php, so preferable not)?
Thanks a lot,
Iain
Vincent Puglia
08-04-2003, 05:48 PM
Hi,
Seems to be a popular question lately on the various boards. So, I'll try to give you a different approach...
Since javascript is, for the most part, an interpreted language, you could try inserting variables within the page(s) being loaded and then determining how much has actually been loaded. For example, in the head section: loadVar = 0; somewhere near the beginning of the body: loadVar++; near the middle: loadVar++; etc., etc.,
If you are simply trying to determine whether the entire page has been loaded, try to access it from a different frame within a do while loop:
done = false;
do {
if (parent.framename.location=='something.html')
done = true;
}while(!done)
Then again, I have no real idea if either method will work, but they are food for thought
Vinny
noisearchitect
08-05-2003, 06:33 AM
hmm..I need to track the iframe as it loads, so that I can have a gradual load bar - just like you'd make in Flash. Can you use Flash to find the size and track the loading of non-flash elements - i.e. anything on the page? The large element on the page will be an applet, I guess written in Java, but I don't know.
So I have an Applet in and iframe in a page. I need a loader bar coming up before the applet, tracking the loading of the applet, as the applet takes too long to load.
What would you recommend as the best way of solving this?
Thanks again,
Iain
n8thegreat
08-05-2003, 09:57 AM
http://www.dynamicdrive.com/dynamicindex4/preloadimage.htm
and
http://www.dynamicdrive.com/dynamicindex4/preloadimage2.htm
are preloaders that track the loading of images, but i dont think you can track the whole page in itself
_LOBO_
08-19-2003, 09:40 AM
is posible to preload a iframe or made a status bar?, can you put some examples?
Thanks for any responce or feedback.
_LOBO_
vBulletin® v3.6.7, Copyright ©2000-2010, Jelsoft Enterprises Ltd.