• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 155
  • Last Modified:

Image Loading

I need a simple script for Netscape and IE (4.X and up) that will make all the images on a page load before they are displayed.
0
Bishma
Asked:
Bishma
1 Solution
 
rafisternCommented:
Put this in the header of the page.

<script language=javascript>
names=new Array("image1.gif","anotherImg.jpg","yetanother.gif");
imgs=new Array();

for(i=0;i<names.length;i++){
  imgs[i]=new Image();
  imgs[i].src=name[i];
}
</script>

where names contains all the image names included on the page.

This script will work on NS2+ or IE3+.
0
 
BishmaAuthor Commented:
Not exactly what I wanted, but it works.
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now