Solved

Image Loading

Posted on 1998-11-04
2
149 Views
Last Modified: 2010-04-09
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
Comment
Question by:Bishma
2 Comments
 
LVL 4

Accepted Solution

by:
rafistern earned 50 total points
ID: 1839394
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
 

Author Comment

by:Bishma
ID: 1839395
Not exactly what I wanted, but it works.
0

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article discusses how to create an extensible mechanism for linked drop downs.
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
In this tutorial viewers will learn how to style elements, such a divs, with a "drop shadow" effect using the CSS box-shadow property Start with a normal styled element, such as a div.: In the element's style, type the box shadow property: "box-shad…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

776 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question