Home Articles FAQs XREF Games Software Instant Books BBS About FOLDOC RFCs Feedback Sitemap
irt.Org
#

Q497 How can I show an image but only in browsers that don't support or have javascript disabled?

You are here: irt.org | FAQ | JavaScript | Image | Q497 [ previous next ]

Either use the <NOSCRIPT> tag:

<noscript>
<img src="picture.gif" width="100" height="100">
</noscript>

Or use JavaScript to stop it being shown:

<img src="picture.gif" name="myImage" width="100" height="100">

<script language="JavaScript"><!--
if (document.images) {
    document.images['myImage'].src = 'blank.gif';
}
//--></script>

Although this last method only works on browsers that support the image object - which excludes Netscape Navigator 2 and Internet Explorer 3.

©2018 Martin Webb