Is there a Perl script method that I can use, or a script that I can obtain that performs this top-down order of loading? I have done many Google searches for this topic to no avail.
Larry
Anyway, I'm pretty sure you can't set image-loading order with Perl, since all Perl does is send data to the browser -- it can't check for or control events. What you'd want to use is JavaScript, which can check for and control browser events.
<IMG onload=document.secondImage.src="image2.jpg">
<IMG name=secondImage src="pixel.gif">
Have the second image be a single pixel so even if it loads first it loads quickly and the user doesn't see it. Then after the first image loads it will automatically change the second image to "image2.jpg".
If you need to load many more images then you'd use a function:
<HEAD>
<script language=javascript>
function loadImages {
document.secondImage.src = "image2.jpg";
document.thirdImage.src = "image3.jpg";
document.fourthImage.src = "image4.jpg";
}
</script>
</HEAD>
<BODY>
<IMG onload="loadImages()">
<IMG name=secondImage src="pixel.gif">
<IMG name=thirdImage src="pixel.gif">
<IMG name=fourthImage src="pixel.gif">
</BODY>
---------
Moderator, can you move this message to the JavaScript forum if appropriate? Thanks!
I thought that all browsers automatically loaded images from top to bottom?
Anyway, I'm pretty sure you can't set image-loading order with Perl
The one developing on the monitor is taking more time over a dialup connection to complete because it is competing with all the others. Sometimes, a picture further down has made more progress than the one at the top. This is a clearer statement of my original intent than my first post, and more in keeping with my small-print topic heading.
I generally prefer to use server side scripting because it is universally available to all visitors, while client side scripting can either be unavailable or disabled on the visitor's computer.
In this instance, however, I could use a JavaScript routine because whether it is available or not to the user, the pictures will still be delivered -- just not one at a time.
I will pursue further questioning on JavaScript in that forum, and will watch for more server side input here. Thanks Michael for your thoughts!
Larry