×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

imageready preload

imageready preload

imageready preload

(OP)
How do I force all images to preload before the pages shows.


Image ready automatically preloads the rollover effects, so
I've added all my gifs to the preload command and the page loads better but how do I force it to load all of the pictures before it will show the page.  I don't want the page to load in many pieces.

RE: imageready preload

Hi,

You need to add every single image you use to the Javascript code that ImageReady creates. I forget the syntax off hand but you will list every single image in a list first.

Hope this helps!

NATE



http://www.mainframehosting.net


Got a question? Search G O O G L E first.

RE: imageready preload

(OP)
I thought I had, I'll double check

RE: imageready preload

(OP)
I had all the gifs in the preload script but it still doesn't all load at the same time.  any other tips?

RE: imageready preload

(OP)
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<!-- ImageReady Preload Script (Mod5_R.psd) -->
<script type="text/javascript">
<!--

function newImage(arg) {
    if (document.images) {
        rslt = new Image();
        rslt.src = arg;
        return rslt;
    }
}

function changeImages() {
    if (document.images && (preloadFlag == true)) {
        for (var i=0; i<changeImages.arguments.length; i+=2) {
            document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
        }
    }
}

var preloadFlag = false;
function preloadImages() {
    if (document.images) {
kmcmainsearch_05_under = newImage("images/spacer.gif");
kmcmainsearch_05_under = newImage("images/go.gif");
kmcmainsearch_05_under = newImage("images/kmcmainsearch_01.gif");
kmcmainsearch_05_under = newImage("images/kmcmainsearch_02.gif");
kmcmainsearch_05_under = newImage("images/kmcmainsearch_03.gif");
kmcmainsearch_05_under = newImage("images/kmcmainsearch_04.gif");
kmcmainsearch_05_under = newImage("images/kmcmainsearch_05.gif");
kmcmainsearch_05_under = newImage("images/kmcmainsearch_06.gif");
kmcmainsearch_05_under = newImage("images/kmcmainsearch_07.gif");
kmcmainsearch_05_under = newImage("images/kmcmainsearch_08.gif");
kmcmainsearch_05_under = newImage("images/kmcmainsearch_09.gif");
kmcmainsearch_05_under = newImage("images/kmcmainsearch_10.gif");
kmcmainsearch_05_under = newImage("images/kmcmainsearch_11.gif");
kmcmainsearch_05_under = newImage("images/kmcmainsearch_12.gif");
kmcmainsearch_05_under = newImage("images/kmcmainsearch_13.gif");
kmcmainsearch_05_under = newImage("images/kmcmainsearch_14.gif");
kmcmainsearch_05_under = newImage("images/kmcmainsearch_15.gif");
kmcmainsearch_05_under = newImage("images/kmcmainsearch_16.gif");
kmcmainsearch_05_under = newImage("images/kmcmainsearch_17.gif");
kmcmainsearch_05_under = newImage("images/kmcmainsearch_18.gif");
kmcmainsearch_05_under = newImage("images/kmcmainsearch_19.gif");
kmcmainsearch_05_under = newImage("images/kmcmainsearch_20.gif");
kmcmainsearch_05_under = newImage("images/kmcmainsearch_21.gif");
        kmcmainsearch_05_over = newImage("images/kmcmainsearch_05-over.gif");
        kmcmainsearch_06_over = newImage("images/kmcmainsearch_06-over.gif");
        kmcmainsearch_07_over = newImage("images/kmcmainsearch_07-over.gif");
        kmcmainsearch_08_over = newImage("images/kmcmainsearch_08-over.gif");
        kmcmainsearch_16_over = newImage("images/kmcmainsearch_16-over.gif");
        kmcmainsearch_18_over = newImage("images/kmcmainsearch_18-over.gif");
        kmcmainsearch_19_over = newImage("images/kmcmainsearch_19-over.gif");
        kmcmainsearch_20_over = newImage("images/kmcmainsearch_20-over.gif");
        preloadFlag = true;
    }
}

// -->
</script>
<!-- End Preload Script -->
</head>


RE: imageready preload

Hi,

Sorry I have been busy. Try this out:
http://javascript.internet.com/generators/preload-images.html

Other than using that generator that basic JS code for preloading is this:

<SCRIPT language="JavaScript">
<!--
pic1= new Image(100,25);
pic1.src="http://someplace.com/image1.gif";
//-->
</SCRIPT>

So to do mulptiple ones you would do them in sequence:

pic1= new Image(100,25);
pic1.src="http://someplace.com/image1.gif";
pic2= new Image(100,25);
pic2.src="http://someplace.com/image2.gif";
pic3= new Image(100,25);
pic3.src="http://someplace.com/image3.gif";  etc

Hope this helps!

NATE



http://www.mainframehosting.net


Got a question? Search G O O G L E first.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close