I have an element with an onerror attribute that sets it to an image if its src is not found. This works great, but I want that onerror logic to be re-evaluated when the image’s src is modified via javascript.
How can I do this?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
obj.onerror()<–that should do itScratch that
It does it automatically: http://jsfiddle.net/FsFmf/ (tested in Chrome 13)