Place the img tag in a div with a spinner as background???
On Friday, April 07, 2006, at 11:26 AM, Alex Young
wrote:>szymek wrote:
>> Hi!
>>
>> I''m making a simple gallery, which uses simple javascript for
changing
>> ''src'' attrbiute of ''img'' element.
>>
>> How to wait for an image to be downloaded completely before trying to
>> display it and while browser downloads this image display a spinner gif
>> or ''please wait'' message etc.?
>>
>> Something like this: http://siter.com.au/dmitry/images.html.
>>
>This should work, but I haven''t had cause to try it... Load the
>high-res image into a hidden img tag, whose onload handler swaps the
>spinner''s src attribute for its own. Alternatively, if
you''ve got
>control over the images, you could be polite to your users and use an
>interlaced file format. Not as Web2.0, but much, much cleaner.
>
>--
>Alex
>_______________________________________________
>Rails mailing list
>Rails@lists.rubyonrails.org
>http://lists.rubyonrails.org/mailman/listinfo/rails
Mikkel Bruun
www.strongside.dk - Football Portal(DK)
ting.minline.dk - Buy Old Stuff!(DK)
--
Posted with http://DevLists.com. Sign up and save your mailbox.