/    Sign up×
Community /Pin to ProfileBookmark

is there any way of making a real load progress in js

Hi

I’m trying to convert a Flash image gallery thing I made into javascript – i can do all the transitions and stuff using scriptaculous – but nowehere can i find any page on the web that tells me if it’s possible to make a load progress function that will get the bytes loaded of an image as it’s loading and also the total bytes size of the image

has anyone come across something like this ?

thanks

to post a comment
JavaScript

3 Comments(s)

Copy linkTweet thisAlerts:
@felgallFeb 23.2008 — Since JavaScript has no knowledge that such things as files exist, there is no way of creating a real load progress indicator using JavaScript.
Copy linkTweet thisAlerts:
@steamPunkauthorFeb 24.2008 — ok - so that rules out making loaders, lol

thanks for your reply
Copy linkTweet thisAlerts:
@cgishackFeb 24.2008 — you could make a loader if it was ONLY for images..

You can have an array of images and preload them all.

Once one is loaded you can update a custom progress bar by 1.

The rest of the page would load around this automatically, but the images could be hidden until you entire array has been preloaded.

Try preloading images using javascript, then look into making a custom progress bar by expanding a div's width based on the total images loaded.

This page has a progress bar to its images.. : http://www.beautifully-webdesign.net/
×

Success!

Help @steamPunk spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.18,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...