Topic awaiting preservation: image onload |
|
---|---|
Author | Thread |
Paranoid (IV) Inmate From: Seattle, WA, USA |
posted 07-02-2002 01:27
how do I access, and change the onload event of an image? |
Lunatic (VI) Mad Scientist From: Massachusetts, USA |
posted 07-02-2002 02:55
Well, this might work: |
Paranoid (IV) Inmate From: Seattle, WA, USA |
posted 07-02-2002 03:21
that's what I tried, but it didn't work |
Lunatic (VI) Mad Scientist From: Massachusetts, USA |
posted 07-02-2002 03:25
Yeah, I was thinking it might not. Apparently there's a distinction between the <img> HTML Element and the actual image object that it displays. |
Lunatic (VI) Mad Scientist From: Massachusetts, USA |
posted 07-02-2002 03:32
Hmm, let me see the code you're using. Are you putting the script that assigns the onload function *after* the image tag? |
Paranoid (IV) Inmate From: Seattle, WA, USA |
posted 07-02-2002 04:40
yes, I want to change the onLoad event after the image has loaded. Sort of hard to explain. But I want to change the onLoad event after the image has initially loaded because the src of the image will change dynamically. |
Lunatic (VI) Mad Scientist From: Massachusetts, USA |
posted 07-02-2002 04:58
Hmm, that's interesting. I've never tried that. |
Paranoid (IV) Inmate From: Seattle, WA, USA |
posted 07-02-2002 06:14
well, I'm gonna do that if I can't find the answer to this but it's gonna be dynamically changed about 20 or so times, so I'd rather not have such long loading time up front. |
Bipolar (III) Inmate From: Amsterdam |
posted 07-02-2002 13:34
Ok, hang on, cause this is weird stuff indeed.. |
Lunatic (VI) Mad Scientist From: Massachusetts, USA |
posted 07-02-2002 13:38
You should realize that in JavaScript, onLoad means nothing - onload is what you want. |
Bipolar (III) Inmate From: Amsterdam |
posted 07-02-2002 14:03
Ouch, thanx for the slap on my forehead, I obviously needed it |