Home Articles FAQs XREF Games Software Instant Books About Feedback Search Site-Map
irt.org logo

Q113 How can I show images that swap, or, use a Java applet, or, use plain images, depending on the browsers capability?

irt.org | Knowledge Base | JavaScript | Image | Q113 [ previous next ]

Q113 How can I show images that swap, or, use a Java applet, or, use plain images, depending on the browsers capability?

Try something like this:

<SCRIPT LANGUAGE="JavaScript"><!--
if (document.images) {
    // do image swapping in JavaScript
}
else if (navigator.javaEnabled()) {
    // do image swapping in Java
}
else {
    // just display static images
}
//--></SCRIPT>

Provide feedback ...
AddThis Social Bookmark Button

Provide feedback ... AddThis Social Bookmark Button


Last Updated: 30th March 2008. Maintained by: Martin Webb and Michel Plungjan
irt.org liability, trademark, document use, privacy statement and software licensing rules apply.
Copyright © 1996-2008 irt.org, All Rights Reserved.