Posted by shashgo on 10/20/2002 8:34:00 PM
I have a wscript that has a hundred or so images to preload. Each of these image names might be existant or not, so I test the existence using img.onload and the nonexistence using img.onerror.
But the preloading of each image requires some time, otherwise they always give an error. So I coded a setTimeout with a delay.
But how would I know what is an appropriate delay? And even if I set the delay to an appropriate value, how can I kep the user ...
|2.||Script doesnt work consistenly
Posted by shashgo on 10/19/2002 2:32:00 PM
The following scipt works to some extent. I have a total of 134 images that I want the script to try and load. Some of these images are bogus and will not load or they might be non existant. So what I have done is store the number of successfully loaded images in variable numImages and ignore the ones that are in error.
The script works well for an image fcount of less than 17 where the value of numImages increments to 16 (17 minus 1, which is okay). The script does not ...
|3.||Problem with script
Posted by shashgo on 10/19/2002 1:08:00 PM
I can not figure out why the following script gives me an error (Ill mark the line and tell you what the error is). The error is in th efunction disp() and is
The first time the script works as expected and I get the last image (#10) display. On the next iteration, I get the error at this line, that says
imgArr[...].src is null or not an object.
According to the script the value of ...
Posted by shashgo on 10/18/2002 9:13:00 AM
I cant figure out when to use imagee event handlers like onLoad(), onError(), onAbort() and complete.
I have a script to test these values for each image that is the src of a pic,
var pic=new Image();