krusty
10-05-2006, 01:45 PM
Hi everybody,
i have problems with image preloading. I have written the following code.
<script type="text/javascript" language="JavaScript">
<!--
var myimages=new Array();
function preloadimages()
{
for (i=0;i<allpicture.arguments.length;i++)
{
myimages[i]=new Image()
myimages[i].src=allpicture.arguments[i]
}
}
var allpicture = new Array();
allpicture("/icons/system.gif","/icons/walk.bmp","/icons/start.jpg","/icons/stop.bmp");
//-->
</script>
Into the body tag i have witten this:
<body onLoad="preloadimages()" bgcolor="#E0E0E0" >
But this function doesn't work. My firefox browser returns the following errors:
Error: allpicture is not a function
Error: allpicture.arguments has no properties
Have anybody an idea what the problem is? I'm not a good javascript coder, but i need this feature. Please help.:(
Sorry for my bad english. :rolleyes:
i have problems with image preloading. I have written the following code.
<script type="text/javascript" language="JavaScript">
<!--
var myimages=new Array();
function preloadimages()
{
for (i=0;i<allpicture.arguments.length;i++)
{
myimages[i]=new Image()
myimages[i].src=allpicture.arguments[i]
}
}
var allpicture = new Array();
allpicture("/icons/system.gif","/icons/walk.bmp","/icons/start.jpg","/icons/stop.bmp");
//-->
</script>
Into the body tag i have witten this:
<body onLoad="preloadimages()" bgcolor="#E0E0E0" >
But this function doesn't work. My firefox browser returns the following errors:
Error: allpicture is not a function
Error: allpicture.arguments has no properties
Have anybody an idea what the problem is? I'm not a good javascript coder, but i need this feature. Please help.:(
Sorry for my bad english. :rolleyes: