Closed Bug 328687 Opened 19 years ago Closed 19 years ago

No events are generated for Image with bad URL

Categories

(Firefox :: General, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 269125

People

(Reporter: morfizm, Unassigned)

Details

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.1) Gecko/20060111 Firefox/1.5.0.1 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.1) Gecko/20060111 Firefox/1.5.0.1 Easy repro. No events when trying to load image at bad URL. See repro steps. Reproducible: Always Steps to Reproduce: Save the following in HTML-file. Open in Firefox. <html> <body> <script language="JavaScript" type="text/javascript"> function error1() { alert('error1'); } function errorupdate1() { alert('errorupdate1'); } function load1() { alert('load1'); } function error2() { alert('error2'); } function errorupdate2() { alert('errorupdate2'); } function load2() { alert('load2'); } var test1="file:///D:/DOCUME~1/ACCENT~1.RIG/LOCALS~1/Temp/moz-screenshot.jpg"; var test2="http://www.disney.com/testme/thisfiledoesntexist.jpg"; var img1 = new Image(); var img2 = new Image(); img1.onerror = error1; img1.onerrorupdate = errorupdate1; img1.onload = load1; img1.src = test1; img2.onerror = error2; img2.onerrorupdate = errorupdate2; img2.onload = load2; img2.src = test2; </script> </body> </html> Actual Results: "error2" popups. Expected Results: "error1" and "error2" both should popup. could you please let me know is there any work-around, until the bug is fixed? I need to load image at URL (with JavaScript), or to say that image is not available. But I can't just infinitely wait...
*** This bug has been marked as a duplicate of 269125 ***
Status: UNCONFIRMED → RESOLVED
Closed: 19 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.