1

Possible Duplicates:
jQuery: Check if image exists
jQuery/Javascript to replace broken images

I need to check if an image file exists and replace it with a default image in case the image does not exist on the server. Please let me know how can this be done using jQuery.

Community
  • 1
  • 1
Rakesh
  • 71
  • 2
  • 3
  • Check the answers of these questions: - http://stackoverflow.com/questions/3327655/jquery-check-if-image-exists - http://stackoverflow.com/questions/3381663/check-if-image-exists-with-given-url-using-jquery You can just set error-handler for your image and replace image source to the default value. – silex May 25 '11 at 13:14

0 Answers0