David
David

Reputation: 3310

JavaScript image preloading and 403 error

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

Answers (2)

Jan Dragsbaek
Jan Dragsbaek

Reputation: 8101

Chrome also has built in functionality to debug stuff like this - its under tools/developertools

Upvotes: 0

zozo
zozo

Reputation: 8582

Install a firebug (mozilla plug-in) and check the net tab. Click on a request and the on response tab.

Upvotes: 1

Related Questions