I was needing to write to a layer from an onmouseover for an image. I have a <div> named and cannot seem to get it to work. Please help.
Printable View
I was needing to write to a layer from an onmouseover for an image. I have a <div> named and cannot seem to get it to work. Please help.
This should do the trick. Post back if you have any problems! http://www.SitePoint.com/forums/smile.gif
<BLOCKQUOTE><font size="1" face="Verdana, Arial">code:</font><HR><pre>
<HTML>
<HEAD>
<TITLE> Writing to a Layer </TITLE>
<SCRIPT LANGUAGE="JavaScript">
<!--
function testfunc() {
if (document.all) {
// MSIE 4.x or greater
document.all.testlayer.innerHTML="BOOM!";
} else {
// Netscape 4.x or greater
document.testlayer.document.open();
document.testlayer.document.write("BOOM!");
document.testlayer.document.close();
}
}
//-->
</SCRIPT>
</HEAD>
<BODY>
<DIV ID="testlayer" STYLE="position:absolute;top:100;left:100;">
Test layer.
</DIV>
<A HREF="http://your.link.here/" onMouseOver="testfunc();">Link here!</A>
</BODY>
</HTML>
[/code]
------------------
-Kevin Yank.
http://www.SitePoint.com/
Helping Small Business Grow Online!