OZONE Asylum
Forums
DHTML/Javascript
Javascript Online Checker (Am i online or offline)
This page's ID:
28659
Search
QuickChanges
Forums
FAQ
Archives
Register
Edit Post
Who can edit a post?
The poster and administrators may edit a post. The poster can only edit it for a short while after the initial post.
Your User Name:
Your Password:
Login Options:
Remember Me On This Computer
Your Text:
Insert Slimies »
Insert UBB Code »
Close
Last Tag
|
All Tags
UBB Help
Welcome on board. The [url=http://www.w3.org/TR/DOM-Level-2-HTML/html.html#ID-17701901]HTMLImageElement[/url] has no such property as [i]complete[/i]. The only way to check if an image is loaded is by attaching an evenListener and listen when its [i]load[/i] event is fired, or when the [i]load[/i] event is fired on the whole document. Also, I personally loath having several setTimeout and "feeding" them with a string literal that will have to be evaluated. Please pass a function handler. And animations should [b]really[/b] be based on a timer to make sure they last the exact same time on all device/platform. One more thing : Setting the visibility of the image back to "visible" a few ( 600! ) ms before setting its opacity will ruin the effect. The image will visible and fully opaque for a while then suddenly fade in. How, where, is this script loaded ? The way it's constructed it looks like its loaded as is before, or in, the body of the page. No event listeners to start it. Have a look at the [url=http://people.opera.com/p01/operaSplash/index.htm]multilple image/element cross fader[/url] I made for the splah page when we launched Opera 9.1. It's quite accessible:[ulist]* with JS off, CSS on and IMG off you'll only see only see the fallback. * with JS on, CSS on and IMG off you'll see the [i]alt[/i] attributes ( which you can style using CSS ) cross fading. * with CSS off and IMG off you should see all the [i]alt[/i] attributes. No need to set one on the fallback.[/ulist]Notice this was a quick hack to prove JS is better than Flash for such a simple thing. This code could use some clean up, and should definitely be in a small Class to not polute the main namespace. For the record Flash is not available on all platforms supported by Opera. This is one more reason to make things accessible. Hope that helps, [url=http://www.p01.org/][img]http://poi.ribbon.free.fr/files/p01_ozoneasylum_sig_galaxy.gif[/img][/url] [small](Edited by [url=http://www.ozoneasylum.com/user/2185]poi[/url] on 07-19-2007 21:55)[/small]
Loading...
Options:
Enable Slimies
Enable Linkwords
« Backwards
—
Onwards »