Rick, that sounds like you delay the entire page load, or i should say
the display of the page until the DOM has loaded?

What I believe Zion is requesting is show the entire page as fast as
possible, for what can be rendered quickly.  Then as a seperate
request begin loading these massive images such that they can be
loaded asynchronously, apart from the initial page load.

The trick would be... you could load these image elements post-
document-load but the problem is knowing when the image has loaded and
thus removing the load display.  Neglecting that you could just
yeah...

window.onload = function(){

      $('container').appendChild(new Element('img', { src : '...',
title : '...', alt : '...' });

});

On Sep 15, 12:21 pm, Rick Waldron <[email protected]> wrote:
> One SUPER hackish thing i've seen done in the past:
> wrap your entire page contents in a div with style="display:none", then
> after that, but before the </body> tag, add another div with a loading
> message... like...
>
> <body>
> <div id=container style="display:none">
> all your content is in here
> </div>
> <div id=loading>
> Loading some big stuff, please hold.
> </div>
>
> <script>
>
> *// Event.observe(window, 'load', ...) will wait until the entire page is
> loaded, including images*
>
> Event.observe(window, 'load', function () {
>   $('loading').hide();
>   $('container').show();});
>
> </script>
>
> </body>
>
> On Tue, Sep 15, 2009 at 12:10 PM, zion <[email protected]> wrote:
>
> > Hi,
>
> > I have couple of really big images in my site that load slow and
> > decreases the user experience, so is there a way to load the few
> > images with prototype & scriptaculous so that it would display
> > somesort of a loading image/page until these few big images are
> > loaded.. it is important that this would apply only for the few
> > selected images..Just cant figure out how to do it.. many thanks.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to