Solved

Image Loading

Posted on 1998-11-04
2
146 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

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
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 …
In this tutorial viewers will learn how to define a gradient in CSS. Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Gradient. Define the background as "linear-gradient(to right, #ee3668, black)". Ensure you …
In this tutorial viewers will learn how to code links for mobile sites that, once clicked, send a call or text to a specified number. For a telephone link (once clicked, calls a number), begin with a normal "<a href=" link tag. For the href, specify…

746 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now