<html>
<head>
<title>Hide Red X in Internet Explorer Javascript Code Snippet</title>
<script>
<!--
// Begin Hide Red X in Internet Explorer
// == This Script Free To Use Providing This Notice Remains == //
// == This Script Has Been Found In The https://snapbuilder.com Free Public Codes Library == //
// == NOTICE: Though This Material May Have Been In A Public Depository, Certain Author Copyright Restrictions May Apply == //
-->
function ImageLoadFailed() {
window.event.srcElement.style.display = "None";
}
</script>
</head>
<body>
<p>Hiding the red X displayed by Internet Explorer when you have empty image fields in a Web App</p>
<p>Append your image paths with this code: OnError="ImageLoadFailed()"</p>
<p><img src="http://your_domain.com/images/image_name.jpg" OnError="ImageLoadFailed()" alt="My Image" /></p>
</body>
</html>
|