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

Q1388 How can I replace a lower resolution image and some explantaion text with a higher resolution image without the text by clicking on the image?

irt.org | Knowledge Base | DHTML | Q1388 [ previous next ]

Q1388 How can I replace a lower resolution image and some explantaion text with a higher resolution image without the text by clicking on the image?

Try the following whioch should work in Netscape Navigator 4.x and Microsoft Internet Explorer 5+:

<script language="JavaScript"><!--
function change(what,by) {
    if (document.layers) {
        document.layers[what].document.open();
        document.layers[what].document.write('<center><img src="' + by + '" width="100" height="100"><\/center>');
        document.layers[what].document.close();
    }
    else if (document.all) {
        document.what.innerHTML = '<center><img src="' + by + '" width="100" height="100"><\/center>';
    }
}
//--></script>

<span id="myLayer" style="position:absolute;">
<center>
<a href="javascript:;" onClick="setTimeout('window.change(\'myLayer\',\'image-01high.gif\')',100)"><img src="image-01.gif" border="0" width="100" height="100"></a>
<br>
Some text
</center>
</span>

Provide feedback ...
AddThis Social Bookmark Button

Provide feedback ... AddThis Social Bookmark Button


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