guten tag.
ich versuche derzeit hover-buttons zu erzeugen, allerdings funktioniert dies nicht, im IE erscheint die Meldung:
window.document.images[...] ist NULL oder kein Objekt.
Hier nun der relevante Quelltext, bin natürlich für jede Hilfe dankbar.
style type="text/css">
<!--
body { }
#haus { position:absolute; top:50px; left:50px; width:85px; height:85px; z-index:1; }
#haus1 { position:absolute; top:50px; left:50px; width:85px; height:85px; z-index:2; }
-->
</style>
<script type="text/javascript">
//<!--
haus = new Image();
haus.src = "das-Haus.gif";
haus1 = new Image();
haus1.src = "das-Haus_over.gif";
function Bildwechsel(Indexnr,Bildobjekt) {
window.document.images[Indexnr].src=haus1.src;}
//-->
</script>
</head>
<body topmargin="0" leftmargin="0" background="Portal.jpg">
<a href="haus.html" OnMouseOver="Bildwechsel(0,haus1)" OnMouseOut="Bildwechsel(0,haus)">
<div id="haus" style="background-image:url(das-Haus.gif);"></div></a>
</body>