image preload help

liunx

Guest
hey,<br />
<br />
i have background images on all the pages on my site and want them to be there before the rest of the page, rather than having to sit and wait for a minute for them to Download <!--more-->.<br />
<br />
i found a bit of javascript code from a javascript tutorial website but it doesn't seem to be working.<br />
<br />
my page is <!-- m --><a class="postlink" href="http://www.worthingtrials.com">http://www.worthingtrials.com</a><!-- m --> i would like the background images to load first then the main picture to load before people enter the site.<br />
<br />
this is the code for the page:<br />
<br />
<html><br />
<br />
<head><br />
<br />
<title>Worthing Trials</title><br />
<br />
<SCRIPT language="JavaScript"><br />
<!--<br />
if (document.images)<br />
{<br />
pic1= new Image(1500,1172); <br />
pic1.src=http://www.htmlforums.com/archive/index.php/"http://www.worthingtrials.com/test.jpg"; <br />
<br />
pic2= new Image(600,385); <br />
pic2.src=http://www.htmlforums.com/archive/index.php/"http://www.worthingtrials.com/brendan_background.jpg"; <br />
<br />
pic3= new Image(600,385); <br />
pic3.src=http://www.htmlforums.com/archive/index.php/"http://www.worthingtrials.com/eborne_background.jpg";<br />
<br />
pic4= new Image(600,385); <br />
pic4.src=http://www.htmlforums.com/archive/index.php/"http://www.worthingtrials.com/baz_and_lee_rocks.jpg";<br />
}<br />
//--><br />
</SCRIPT><br />
<br />
<br />
<br />
</head><br />
<br />
<body><br />
<br />
<table width="600px" border="0" align="center"><br />
<tr><br />
<td align="center"><br />
<br />
<img src=http://www.htmlforums.com/archive/index.php/"http://www.worthingtrials.com/header.gif" alt="Worthing Trials"><br />
<br />
<a href=http://www.htmlforums.com/archive/index.php/"http://www.worthingtrials.com/main.html" onMouseOver="window.status='Worthing Trials';return true"><img src=http://www.htmlforums.com/archive/index.php/"http://www.worthingtrials.com/baz_and_lee_rocks.jpg" border="1" alt="Worthing Trials"></a><br />
<br />
<font color="black" face="verdana" size="-2"><br />
<br />
<P align="center"><b>Welcome to Worthing Trials - Last updated on the 13th November 2002. <br />
<p>The site is currently undergoing numerous changes to enable your visit to be quicker and easier - please excuse any temporary problems, these will soon be rectified.</b></p><br />
<br />
</font><br />
<br />
</td><br />
</tr><br />
</table><br />
<br />
</body><br />
<br />
</html><br />
<br />
help please!<br />
<br />
chris.<!--content-->impossible. you cannot control the images in that fashion. every user has a different connect to teh net, some fast and some slow. and everybody will have to Download <!--more--> the images at least once. until they get Download <!--more-->ed you can't preload them.<br />
<br />
if teh users connect is fast then they might see what you are after, but if the users connection is slow then you will see what ever is downlaoded first.<!--content-->I advise that you reduce the size of your images using an image editor. Also, try searching for the topic you are after first, since this came up about a week / 2 weeks ago.<!--content-->
 
Back
Top