User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the HTML and CSS section within the Web Development category of DaniWeb, a massive community of 402,745 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,523 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our HTML and CSS advertiser: Lunarpages Web Hosting

preloading images

Join Date: Jun 2007
Posts: 1
Reputation: andrea_jazz is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
andrea_jazz andrea_jazz is offline Offline
Newbie Poster

Re: preloading images

  #9  
Jun 2nd, 2007
Originally Posted by kcire View Post
I have used the following for the same problem you described...

in your <head> put:
<style type="text/css">
.hiddenPic {display:none;}
</style>


and before your ending </body>, after your actual HTML and so, you put:
<img src="http://www.yourweb.com/images/picture1.jpg" alt="picture1"
title="picture1" height="131" width="700" class="hiddenPic">


For every picture you want to be preloaded you create a new <img> tag with the hiddenpic class in it...

After doing this I copied the list of <img> tags to every page involved. When doing this be sure not to forget the <head> part !

Of course I do not know if this will work...I think/hope it does...:rolleyes:


hi!
i'm happy to have red your comments, because it works, under IE and Firefox.
i used JavaScript image preload, but your way works better!

thank you,
bye
Reply With Quote  
All times are GMT -4. The time now is 7:53 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC