473,396 Members | 2,092 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

how to know is image loading done?

i have my own slideshow player (really simple one, which has no image pre-caching) which when it try to change the picture, it simply do a :

document.images.show.src = file[current];

and then wait for a few second before it change the image again.

problem is when it's used over slow connection sometimes the loading of the image will take more than "a few seconds" and code will change the image again even before the one it was trying to show has loaded and show up on the browser.

i'm thinking i should wait until the image has been loaded sucessfully before i do the counting of a few seconds. in javascript how can i check is the image loaded?

thanks,
byron
Jul 22 '06 #1
1 4960
Banfa
9,065 Expert Mod 8TB
Try checking

document.images.show.complete

It's not part of the W3C standard but most browsers seem to support it.

http://www.w3schools.com/htmldom/dom_obj_image.asp
Jul 22 '06 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: zborisau | last post by:
Hey good people, I've been given a problem to solve recently - and stuck with the solution for a good 4 days already. i have a link which leads to popup window. the purpose of that popup...
1
by: Raj Chudasama | last post by:
i have a need to load image from URL. the image is really small (gif) and i use the following code. but the code is too slow any1 have any alternative way(S)? here is the url...
1
by: M West | last post by:
continuation of my previous post, thanks to all those that contributed with answers I am creating a control that will take an image and make parts of it transparent, this is done by creating and...
4
by: Michael C | last post by:
It seems that no matter how I load a bitmap into memory it remains attached to whatever I used to create it. If I obtained the bitmap from a file the file stays locked or if it came from a stream I...
3
by: Peter | last post by:
..NET 2.0 I have an Image on my form and I am trying to clear this image and re-load it with different image. Everything works fine, but once I load the image I can not delete this image until...
15
by: Baron Samedi | last post by:
Every so often, I see someone wanting to prevent heir images being downloaded and the general consensus is "you can't". Now a friend has asked me to think some more about this, and I think that...
11
by: Adam Sandler | last post by:
Hello, Having an issue with JavaScript in my ASP.Net page. I use some COTS, which for all intents and purposes, simply makes a jpeg file and physically places it in a directory on the web...
6
by: sarika | last post by:
Hi All i m making a web site having number of big images. My requirement is i want to dunamically split the images while downloading so that my website works fast and image downloading does not...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.