Hi marcus,

This sounds interesting. What kind of logic do you use to check if all
of the images are loading? Do you hard code a number?

Would love to see some more code if possible.

On 11/28/07, Marcus Wu <[EMAIL PROTECTED]> wrote:
> I wrote an object to handle it. It just receives an array of image urls and
> it does:
>
> var imageLoad = new Image();
> imageLoad.onload = LoadImages.prototype.onload;
> imageLoad.onerror = LoadImages.prototype.onerror;
> imageLoad.onabort = LoadImages.prototype.onabort;
> for each of them.
>
> The onload will increment the number of images loaded and calls another
> routine to check the total. That routine can also update a percentage bar if
> you want. When it reaches 100% it calls another routine -- a callback I set
> on object construction -- which actually does the app launch. onerror and
> onabort reports an error and cancels/interrupts the application load.
>
>
> On Nov 27, 2007 4:51 PM, Steve Finkelstein <[EMAIL PROTECTED]> wrote:
> >
> > Hey folks,
> >
> > I was curious what kind of suggestions anyone might be kind enough to
> > offer to set some kind of notification to users that the DOM is still
> > loading, and what kind of javascript they're writing for it.  I have
> > an application currently that allows users to start toggling stuff
> > before the images are done downloading for it and what not. I'd like
> > to not allow any interaction and use the usual Loading ... followed by
> > a spinner until it is ready. I'm kind of stuck of finding code that'll
> > add the loading overlay and not allow interaction until the DOM is
> > completely ready with images available.
> >
> > Joe Hewitt does this exceptionally well with facebook's iPhone
> application.
> >
> > Cheers,
> >
> > - sf
> >
> >
> >
> >
>
>
>  >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"iPhoneWebDev" 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/iphonewebdev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to