Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > Preload many images

Reply
Thread Tools

Preload many images

 
 
Albert Spencil
Guest
Posts: n/a
 
      05-15-2004
I have tried several preload scripts found here; plus, some of my own.
The only thing that works is the unsophisticated loading of those
tiny images. The download consist of 100+ images amounting to 50+mb;
and, normally completes in less than 1 minute without preload (using
DSL). The preload terminates after 6 or 7
images and seems to time-out in the middle of an image. A reload will
download a few more, etc. I have used the <body onLoad=function()>
approach as well as the
non-function approach of JS that executes immediately with the page's
loading.
Getting the same results with Netscape-7 and IE-6.

I need to add: The source of the array containing the image
references is a '.js' file. That doesn't seem pertinent as some of the
images always load.

Got any ideas??

Tx Albert Spencil
 
Reply With Quote
 
 
 
 
Juliette
Guest
Posts: n/a
 
      05-15-2004
Albert Spencil wrote:
>
> I have tried several preload scripts found here; plus, some of my own.
> The only thing that works is the unsophisticated loading of those
> tiny images. The download consist of 100+ images amounting to 50+mb;
> and, normally completes in less than 1 minute without preload (using
> DSL). The preload terminates after 6 or 7
> images and seems to time-out in the middle of an image. A reload will
> download a few more, etc. I have used the <body onLoad=function()>
> approach as well as the
> non-function approach of JS that executes immediately with the page's
> loading.
> Getting the same results with Netscape-7 and IE-6.
>
> I need to add: The source of the array containing the image
> references is a '.js' file. That doesn't seem pertinent as some of the
> images always load.
>
> Got any ideas??
>
> Tx Albert Spencil


Albert,

If you show us some code, we may be able to help.

J.
 
Reply With Quote
 
 
 
 
Albert Spencil
Guest
Posts: n/a
 
      05-16-2004
Juliette <"jrf[spamblock]"@jokeaday.net> wrote in message news:<>...
> Albert Spencil wrote:
> >
> > I have tried several preload scripts found here; plus, some of my own.
> > The only thing that works is the unsophisticated loading of those
> > tiny images. The download consist of 100+ images amounting to 50+mb;
> > and, normally completes in less than 1 minute without preload (using
> > DSL). The preload terminates after 6 or 7
> > images and seems to time-out in the middle of an image. A reload will
> > download a few more, etc. I have used the <body onLoad=function()>
> > approach as well as the
> > non-function approach of JS that executes immediately with the page's
> > loading.
> > Getting the same results with Netscape-7 and IE-6.
> >
> > I need to add: The source of the array containing the image
> > references is a '.js' file. That doesn't seem pertinent as some of the
> > images always load.
> >
> > Got any ideas??
> >
> > Tx Albert Spencil

>
> Albert,
>
> If you show us some code, we may be able to help.
>
> J.


OK. This is a very simple one. For NS4.7 it preloads anywhere from 2
to all (79). For NS7x it preloaded 7 and on restores it downloaded a
few more each time. For IE6 it consistently preloads just the last
image (#79).

<script src='imageFile.js'></script> // contains the array 'pics'
<script language='javascript'><!--
/*-------------Function to preload images----------------*/

function doPreload()
{

for(loop = 0; loop < pics.length; loop++)
{
var an_image = new Image();
an_image.src = pics[loop];
}
}
/*-------------------------------------------------------------------*/
//-->
</script>
</head>
<body onLoad=doPreload() bgcolor="#004f00" text="#ffffff"
link="#ffffff" vlink="ffffff" alink="ffff48">
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Preload images returned by an HttpHandler =?Utf-8?B?Q2FzcGE=?= ASP .Net 2 03-28-2007 12:36 AM
Preload Images in Asp.Net 2.0. How can I do this? shapper ASP .Net 4 11-25-2006 06:16 PM
preload images from sql server ks ASP .Net 1 08-05-2006 07:13 AM
Preload TreeView images Mark ASP .Net Web Controls 2 02-14-2004 11:15 AM
preload images Morris HTML 5 11-14-2003 02:19 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57