JSFiddle - React, Tailwind, and code Playground
by zainshaikh
HTML
<img id="ProductImage" onerror="handle(this,'product-detail');" src="\Desktop\PR_DET.jpg" border="0" alt="Literacy Design Collaborative">
CSS
</style>
<script type="text/javscript">
function handle(element,type) {
log('handle error');
try {
var nopreview = "http://commerce.farooq.tv/images/nopreview.png";
if (element) {
element.onerror = "";
if (type == 'author') {
nopreview = "http://commerce.farooq.tv/images/nopreview-author.png";
}
else if (type == 'product-detail') {
nopreview = "http://commerce.farooq.tv/images/nopreview-product.png";
}
else if (type == 'review') {
nopreview = "http://commerce.farooq.tv/images/nopreview-staffreview.png";
}
element.src = nopreview;
}
} catch (ex) { log("Exception in UltraLearn.HandleThumbnailError():"); log(ex.message); }
};
function log(d){console.log(d);}
</script>
<style>