I am using myeclipse. When I typed onerror... it was showing warning.
Then I checked
http://www.w3schools.com/tags/tag_IMG.asp .
No such attribute defined for img tag. Even though,
I am going to try this code... but I think there should be one such attribute.
I tried the server side code & It is perfectly working.