473,218 Members | 1,389 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,218 software developers and data experts.

how to ensure complete loading of many gifs

Hi,

how do i code such that all gifs are loaded without missing any one of them ?
I always get missing few gifs when the page loading with 30 gifs.
I use IE6 to browse many <a href='myurl'><img src='mygif.gif'></a>

Regards
Hoe
Jul 23 '05 #1
4 1432
> "tnhoe" <tn***@pc.jaring.my> wrote in message
news:42**********@news.tm.net.my...
Hi,

how do i code such that all gifs are loaded without missing any one of
them ?
I always get missing few gifs when the page loading with 30 gifs.
I use IE6 to browse many <a href='myurl'><img src='mygif.gif'></a>

Regards
Hoe


If your server, client, some proxy or network setup is somehow dropping
http connections while retrieving images from the server, there is
nothing client-side JavaScript can do to help you.

--
Grant Wagner <gw*****@agricoreunited.com>
comp.lang.javascript FAQ - http://jibbering.com/faq
Jul 23 '05 #2
Try using the LiveHttpHeaders extension in Firefox to see exactly why
certain images aren't being loaded: http://livehttpheaders.mozdev.org/

Maybe the server you are using can only handle so many connections at a
time like IIS in Windows 2000 Pro or XP Pro, and is therefore denying
connections over a certain limit.

Jul 23 '05 #3
All images are populated in the document.images array. You could assign
an onReadyStateChange event to each of the images you want to make sure
to be loaded completely.
And then you could check for the readystate variable for any of these
values - "uninitialised", "complete", "loading", and one more which i
dont remember
document.images[i].onReadyStateChange = function () {
if (document.images[i].readystate == complete) {
// This image has finished loading. You could set some flags
to do your post-processing after _all_ images are loaded
}
}
One thing Im not very sure is whom do you assign the onReadyStateChange
event. I guess it is for each object in the document.images[] array.
But can someone correct me if im wrong here?

Thanks

Anand

Jul 23 '05 #4
Once the page has loaded you could check each image to see if it has
loaded (you can figure out how no doubt) and assign its src again
(maybe with a random querystring attached). That will at least "kick"
the unloaded ones to try again to load.

Tim.
"tnhoe" <tn***@pc.jaring.my> wrote in message
news:42**********@news.tm.net.my...
Hi,

how do i code such that all gifs are loaded without missing any one of
them ?
I always get missing few gifs when the page loading with 30 gifs.
I use IE6 to browse many <a href='myurl'><img src='mygif.gif'></a>

Regards
Hoe
Jul 23 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: jerrygarciuh | last post by:
Hello everyone, Wondering if anyone else has had problems with gifs created by php or if anyone sees a problem with this code. Symptom: created jpegs work fine and created gifs work fine in...
3
by: jerrygarciuh | last post by:
Hello everyone, Wondering if anyone else has had problems with gifs created by php or if anyone sees a problem with this code. Symptom: created jpegs work fine and created gifs work fine...
11
by: Detlef Hüttenbach | last post by:
Whereas loading tiffs and pngs from file into an Image WebControl work, the images aren't shown when loaded from streams: In a WebForm, the image's property "ImageUrl" is set to a handler, and...
0
by: GrandpaB | last post by:
I am creating a small simulation in VB and wish to incorporate several animated GIFS. I can load the GIFS from the hard drive into a picture box and they animate, but I have two questions. 1.)...
2
by: hbchai | last post by:
I'm adapting the ajax-like asynchronous request pattern mentioned in this article: http://www.xml.com/pub/a/2005/11/09/fixing-ajax-xmlhttprequest-considered-harmful.html?page=2 for my Sudoku...
4
by: Hexman | last post by:
Code below ---- I've asked a similar question on this forum earlier. This is a slightly different situation. Previous Question ---- I'm trying to save some specific web pages to disk as...
2
by: Scirious | last post by:
People, I need a way to detect the moment an animated GIF gets to it's end to switch to a different GIF. I can't use a Timer because the GIFs have different times and doing so (as I'm doing at the...
1
by: glasssd | last post by:
Hi, I was hoping someone might have some ideas on how I can hack around a problem I'm having with the auto-complete feature of the ComboBox. I have a data entry application that uses a pair of...
0
by: helraizer1 | last post by:
Hey, I have a PHP script that I made for an image based shoutbox with emoticons. The problem is that php GD doesn't support animated gifs, yet perl GD does. How would I make it so that I could...
0
by: veera ravala | last post by:
ServiceNow is a powerful cloud-based platform that offers a wide range of services to help organizations manage their workflows, operations, and IT services more efficiently. At its core, ServiceNow...
0
by: VivesProcSPL | last post by:
Obviously, one of the original purposes of SQL is to make data query processing easy. The language uses many English-like terms and syntax in an effort to make it easy to learn, particularly for...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 3 Jan 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). For other local times, please check World Time Buddy In...
0
by: jianzs | last post by:
Introduction Cloud-native applications are conventionally identified as those designed and nurtured on cloud infrastructure. Such applications, rooted in cloud technologies, skillfully benefit from...
2
by: jimatqsi | last post by:
The boss wants the word "CONFIDENTIAL" overlaying certain reports. He wants it large, slanted across the page, on every page, very light gray, outlined letters, not block letters. I thought Word Art...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...

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.