Solved

script for loading bar/graphic on slow page (persits images loading)

Posted on 2007-11-28
3
416 Views
Last Modified: 2012-08-13
Hi

I am developing an online store that on the product list page loads up using persits small thumbnails of images. It's fast in some browsers and sluggish in oteres.

I'd like to have a small loading graphic which will loop until all the images are loaded. Is this possible?

Pages are asp vb

Thanks

Dave
0
Comment
Question by:swordfishsoup
3 Comments
 
LVL 14

Accepted Solution

by:
B_Dorsey earned 500 total points
ID: 20367134
basically  I would just flaot a image at the center of the page with some loading bars, then use the body onload event to remove it.
0
 
LVL 63

Expert Comment

by:Zvonko
ID: 20368559
Check this method:
<img src="first.gif" onLoad="this.onload=null;this.src='product1.gif';" >
<img src="first.gif" onLoad="this.onload=null;this.src='product2.gif';" >
<img src="first.gif" onLoad="this.onload=null;this.src='product3.gif';" >

Open in new window

0
 
LVL 8

Expert Comment

by:deadite
ID: 20372048
Try preloading your images like so:
I don't know if this is ASP or not, but here is a javascript.  Google "Preload Images" and you'll find a ton of methods to do this.  You can basically put that in an onload and display an image there...

    <SCRIPT language="JavaScript">
    <!--

    if (document.images)
    {
      preload_image_object = new Image();
      // set image url
      image_url = new Array();
      image_url[0] = "http://mydomain.com/image0.gif";
      image_url[1] = "http://mydomain.com/image1.gif";
      image_url[2] = "http://mydomain.com/image2.gif";
      image_url[3] = "http://mydomain.com/image3.gif";

       var i = 0;
       for(i=0; i<=3; i++)
         preload_image_object.src = image_url[i];
    }

    //-->
    </SCRIPT>  
0

Featured Post

Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

Question has a verified solution.

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

Suggested Solutions

Not long ago I saw a question in the VB Script forum that I thought would not take much time. You can read that question (Question ID  (http://www.experts-exchange.com/Programming/Languages/Visual_Basic/VB_Script/Q_28455246.html)28455246) Here (http…
Deploying a Microsoft Access application in a Citrix environment is not difficult but takes a few steps. However, Citrix system people are often of little help, as they typically know next to nothing about Access. The script provided here will take …
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

803 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