Closed Bug 120587 Opened 23 years ago Closed 23 years ago

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

Categories

(Core :: DOM: UI Events & Focus Handling, defect)

x86
Windows 98
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 22820

People

(Reporter: jim, Assigned: joki)

References

()

Details

(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
Closed: 23 years ago
Resolution: --- → DUPLICATE
QA Contact: madhur → rakeshmishra
QA Contact: rakeshmishra → trix
Component: Event Handling → User events and focus handling
You need to log in before you can comment on or make changes to this bug.