You are here: Re: Question, need expert help pre-loading images properly (IE + FireFox), thank you :) « HTML « IT news, forums, messages
Re: Question, need expert help pre-loading images properly (IE + FireFox), thank you :)

Posted by Stevo on 10/25/07 22:02

SaraLeePerson@gmail.com wrote:
> <script>
> pic100= new Image;
> pic100.src="./imageme.gif";
> </script>
>
> <img src=./imageme.gif>

OK, you're expectations are too high. That pic100.src *is* starting to
preload the file, but your img tag is going to start using it long
before it will be finished loading. What people usually do in cases like
this is to set the img src to a blank image, and only when pic100.src
has finished loading, do you then change the src of the img to point to
it. If you google "preload images javascript" you'll find lots of
ready-coded examples.

 

Navigation:

[Reply to this 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

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