Snap Builder Public Codes Library
Snap | Generators | Login | Browse | Search | Enter Code | Export Snap Builder Public Codes Library

 

Category: Javascript Codes Library >> Image Effects >> Hide Red X in Internet Explorer


Code Snippet </> Info


Snippet Name: Hide Red X in Internet Explorer

Description: Hide the red X in Internet Explorer when you have empty image fields in a Web App.

Compatible Browsers:

Internet Explorer Browser

Note: The code will not cause any issues with other browsers... they will ignore this code snippet and show the image as intended.

Author: SnapBuilder <snippets@snapbuilder.com>

Last Modified: 2015-12-13 06:42:25

Language: javascript

Highlight Mode: javascript

Copy Codes: Use Free Notepad ++
Bookmark and Share

Snap HTML Code Editor:
Paste the source code, make changes and instantly see it in live preview.
Snap HTML Code Editor


  About Copying

<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 http://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>


[ Snippet Options ]

 

© 2002 -  Snap Builder Public Codes Library