You are here: irt.org | FAQ | DHTML | Q1388 [ previous next ]
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>