Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > Image Question

Reply
Thread Tools

Image Question

 
 
Greg Griffiths
Guest
Posts: n/a
 
      02-23-2004
Is there a Javascript way to check if an image has been rendered on the
page ? For example if my HTML includes :

<img name="testImg" src="images/one.gif">

is there anyway to tell using Javascript post page load if that image
has actually been loaded ?

 
Reply With Quote
 
 
 
 
Mick White
Guest
Posts: n/a
 
      02-23-2004
Greg Griffiths wrote:

> Is there a Javascript way to check if an image has been rendered on the
> page ? For example if my HTML includes :
>
> <img name="testImg" src="images/one.gif">
>
> is there anyway to tell using Javascript post page load if that image
> has actually been loaded ?
>


<img onload="function(){whatever}"
Mick
 
Reply With Quote
 
 
 
 
Lasse Reichstein Nielsen
Guest
Posts: n/a
 
      02-24-2004
"Andrew Urquhart" <reply_via_contact_page@website_in.sig> writes:

> Just a general note:
> Some browsers don't support the onload event for images (i.e. Opera)


Opera does support the onload event. There was a bug somewhere around
7.11 (or was it 7.20) where it failed, but in general it works (and did
in Opera 6 as well).

> so be sure to provide a graceful and accessible alternative if
> possible.

/L
--
Lasse Reichstein Nielsen -
DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleDOM.html>
'Faith without judgement merely degrades the spirit divine.'
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Drive Image or True Image Question Jimmy Smith Computer Information 1 10-11-2005 02:05 AM
wx.Image: Couldn't add an image to the image list. Laszlo Zsolt Nagy Python 1 01-26-2005 09:55 PM
Image can't hold an image? Gary B ASP .Net 3 08-01-2003 01:31 AM
How To Browse for an image file and save it to image server folder Mike John ASP .Net 0 07-28-2003 04:55 PM
Streaming Image data to an image viewer Jerry J ASP .Net 0 07-18-2003 01:33 PM



Advertisments