|
Posted by Neredbojias on 07/07/06 08:04
To further the education of mankind, "Chris Tomlinson" <anon@anon.com>
vouchsafed:
> Hi, is there any way to specify the sequence in which images load on a
> web page?
>
> More specifically, here is what we need to achieve:
>
> Image1 starts loading first and the browser does not continue through
> the HTML until Image1 has loaded COMPLETELY. When Image1 is done,
> Image2 BEGINS loading. When Image2 is 100% done, only then does Image
> 3 begin... and so on...
>
> Anyone able to offer a way to do this?
Here is part of the actual code where I do just that:
function gradel(n) {
if (document.images[n].complete) {
grado(n,0);
} else {
setTimeout("gradel(" + n + ");",200);
}
}
The key, of course, is the "document.images[x].complete" method. You
should be able to figure out how to make a progression from this to suit
your needs.
--
Neredbojias
Infinity has its limits.
Navigation:
[Reply to this message]
|