PDA

View Full Version : is there an equivalent to the readyState property of an image


brothercake
10-11-2002, 07:51 PM
one that works in gecko browsers

Bosko
10-11-2002, 08:47 PM
Do you mean equivalent and property? I make that mistake too when I am in a hurry and try to type :)

joh6nn
10-11-2002, 09:29 PM
images come with onload events, and with complete properties, which return a boolean value, indicating true if they've finished trying to load ( they'll say complete if there was an error, and the file couldn't be found ), and false, if the image is still trying to load.

that any help?

brothercake
10-12-2002, 02:15 AM
What I wanted was a way to retrieve whether an image has loaded without using its onload event. In IE I can go

imgObj.readyState

which returns a range of properties such as "uninitialized" or "complete".

I was looking for a way of doing the same thing in gecko

chrismiceli
10-12-2002, 03:02 AM
<img src="test.jpg" onAbort="alert('why did you stop it')" onError="alert('there was an error')">

is that what you want?

jkd
10-12-2002, 03:57 AM
There is a "complete" boolean-value property of the HTMLImageElement interface.

joh6nn
10-13-2002, 08:06 AM
::puzzled::

i thought i said that.

jkd
10-13-2002, 04:09 PM
Originally posted by joh6nn
::puzzled::

i thought i said that.

Oh, so you did. I must have missed it. :D

brothercake
10-13-2002, 05:50 PM
Originally posted by joh6nn
::puzzled::

i thought i said that.


Yeah I missed it too :rolleyes: Thanks - that was the one.