Will someone please show me how to append the lines in this "sequencial picture loading" script.
Within the dotted lines is a complete script for preloading five pictures. The line for the first image is appended with an improvised "onLoad" event for illustration. Below that are some snippets of code I found but I don't know how to properly construct the lines to halt the execution of the script until each picture is fully loaded. This will work in Internet Explorer -- not in Netscape. The concept is pretty simple. As the page begins to load, the first picture in the list is called for, but since this is coupled with an onLoad event, one that must give a positive return value before proceeding to the next line, no other pictures will be sent down the wire until picture #1 has completely loaded; as each line for an image will be appended, except for the last one, the rest of the pictures follow this sequence, one by one. I just need someone to show me the proper form and syntax to use so that the script is halted if the onLoad (or the the complete download of a given picture ends up being negative or 'false') and to "proceed" with the script if the Onload for a given picture ends up being "true."
-----------------------------------------
<script language=javascript>
function loadImages {
document.firstImage.src = "LIC-1.jpg"; onLoad="returnValue();return false;">
document.secondImage.src = "LIC-2.jpg";
document.thirdImage.src = "LIC-3.jpg";
document.fourthImage.src = "LIC-4.jpg";
document.fifthImage.src = "LIC-5.gif";
}
</script>
-----------------------------------------
onClick="returnValue();return false;">
function someFunction()
{ if (something)
{proceed=true}
else {proceed=false}
return proceed
}
Within the dotted lines is a complete script for preloading five pictures. The line for the first image is appended with an improvised "onLoad" event for illustration. Below that are some snippets of code I found but I don't know how to properly construct the lines to halt the execution of the script until each picture is fully loaded. This will work in Internet Explorer -- not in Netscape. The concept is pretty simple. As the page begins to load, the first picture in the list is called for, but since this is coupled with an onLoad event, one that must give a positive return value before proceeding to the next line, no other pictures will be sent down the wire until picture #1 has completely loaded; as each line for an image will be appended, except for the last one, the rest of the pictures follow this sequence, one by one. I just need someone to show me the proper form and syntax to use so that the script is halted if the onLoad (or the the complete download of a given picture ends up being negative or 'false') and to "proceed" with the script if the Onload for a given picture ends up being "true."
-----------------------------------------
<script language=javascript>
function loadImages {
document.firstImage.src = "LIC-1.jpg"; onLoad="returnValue();return false;">
document.secondImage.src = "LIC-2.jpg";
document.thirdImage.src = "LIC-3.jpg";
document.fourthImage.src = "LIC-4.jpg";
document.fifthImage.src = "LIC-5.gif";
}
</script>
-----------------------------------------
onClick="returnValue();return false;">
function someFunction()
{ if (something)
{proceed=true}
else {proceed=false}
return proceed
}