<img src="chicken.gif" onerror="this.src='egg.gif';this.alt='egg'" alt="chicken"> doesn't work.

RESOLVED DUPLICATE of bug 22820

Status

()

RESOLVED DUPLICATE of bug 22820
17 years ago
16 years ago

People

(Reporter: jim, Assigned: joki)

Tracking

Trunk
x86
Windows 98
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(URL)

(Reporter)

Description

17 years ago
(Probably wrong component, can't see a more appropriate)

When Mozilla suppresses the image to just an alt after a 404 on the image, 
changing this.src and this.alt has no effect - this technique is often used as 
a "is this server up" technique or others.

e.g.

<img src="http://127.0.0.1/i.gif" alt="server up" onerror="this.src='d.gif'" 
alt="server down">

The event fires okay, but because the image object has been swallowed to just 
text, you can't then change it with src/alt.  No script errors are produced.

Jim,
Duplicate of "Broken IMG 'src' cannot be changed to valid 'src' dynamically"

See also bug 70820

*** This bug has been marked as a duplicate of 22820 ***
Status: UNCONFIRMED → RESOLVED
Last Resolved: 17 years ago
Resolution: --- → DUPLICATE

Updated

17 years ago
QA Contact: madhur → rakeshmishra

Updated

16 years ago
QA Contact: rakeshmishra → trix
You need to log in before you can comment on or make changes to this bug.