Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Image Loading

Posted on 1998-11-04
2
Medium Priority
?
154 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 150 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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
In this tutorial viewers will learn how add a scalable full-width header using CSS3. Create a new HTML document with an internal stylesheet. Set a tiled background.:  Create a new div and name it Header. Position it with position:absolute at the top…
In this Micro Tutorial viewers will learn how to create navigation buttons that change on rollover, using CSS (Continuation of the CSS Image Sprite tutorial) Create a parent ID for all the list items       - Specify position: absolute and display: block…

876 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