Reputation: 3310
I'm preloading Images using Javascript. Some of them returns with error.
How can I know in code which error it is?
404/403?
onerror (evt)
doesn't provide one - or I just don't know where to look.
thanks.
UPDATE
I know that I can use FireBug / WebInspector... I need to decide dynamically, via code, which image to put on screen instead of erroneous one: "Image not found" or "Prohibited" or sth.
Upvotes: 0
Views: 527
Reputation: 8101
Chrome also has built in functionality to debug stuff like this - its under tools/developertools
Upvotes: 0
Reputation: 8582
Install a firebug (mozilla plug-in) and check the net tab. Click on a request and the on response tab.
Upvotes: 1