Reply to Re: Looking for an event trigger

Your name:

Reply:


Posted by Mateusz Markowski on 10/13/06 21:49

Chung Leong napisal(a):
> Mateusz Markowski wrote:
> > Chung Leong napisal(a):
> > > Cleverbum@hotmail.com wrote:
> > > > I realise that once the html in the page has been sent the browser
> > > > still needs to load all of the images, that's why the onload won't
> > > > work, and why I was looking for a trigger that fires "once the page and
> > > > all the images on it have loaded"
> > > >
> > > > I'm reluctant to change the language of the processing script as it's
> > > > taken me quite some time to write it all, at the moment I've just got a
> > > > link at the bottom of the processing page saying "once the above box is
> > > > completely full please click here", unless there is something which can
> > > > do that automatically I think I will just forget about it and rely on
> > > > someone's built in clicking skills.
> > >
> > > As mentioned already, each img tag would emit an onload event. The
> > > event doesn't bubble up so you have to add onload=" ... " to each tag.
> > > Now, if you just increment a counter as the images load and do a
> > > redirect when it reaches the total, you'll have what you need. Simple,
> > > no?
> >
> >
> > function waitForImages()
> > {
> > while(!document.images[document.images.length-1].complete);
> > document.location.href = '/loaded';
> > }
> >
> > waitForImages();
> >
> > Isn't easier?
>
> I'm pretty sure that would cause the browser to freeze.

True, works only on Opera.

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация