Samuel
Erfahrenes Mitglied
ähhh
wieso funktioniert dieses script nicht?
wieso funktioniert dieses script nicht?
Code:
<html>
<head>
<meta http-equiv="content-type" content="text/html;charset=ISO-8859-1">
<meta name="generator" content="Adobe GoLive 5">
<title>..::.. welcome to www.web-creations.at ..::.. </title>
<script language="JavaScript">
function changeImg(imgdivName, imgSrc, onoff) {
var d=document;
var ref;
document.images[imgdivName].src=imgSrc;
if (onoff=="on") {
if (d.all) {
d.all[imgdivName].style.visibility='visible';
} else if ((!d.all) && (d.getElementById)) {
ref=d.getElementById(imgdivName);
ref.style.visibility='visible';
} else if (d.layers) {
d.layers[imgdivName].style.visibility='show';
}
} else if (onoff=="off") {
if (d.all) {
d.all[imgdivName].style.visibility='hidden';
} else if ((!d.all) && (d.getElementById)) {
ref=d.getElementById(imgdivName);
ref.style.visibility='hidden';
} else if (d.layers) {
d.layers[imgdivName].style.visibility='hide';
}
}
}
</script>
</head>
<body bgcolor="#ffffff">
<table cellpadding=0 cellspacing=0 border=0 width=100% height=100%>
<tr>
<td align="center">
<img src="gfx/black1px.gif" width=100% height=1><p>
<a href="main.php?action=news" onmouseover="changeImg('news', 'gfx/news.gif', 'on');" onmouseout="changeImg('news', 'gfx/gaunews.gif', 'off');"><img src="gfx/gaunews.gif" border=0 name="news"></a>
<a href="main.php?action=news" onmouseover="changeImg('scripts', 'gfx/scripts.gif', 'on');" onmouseout="changeImg('scripts', 'gfx/gauscripts.gif', 'off');"><img src="gfx/gauscripts.gif" border=0 name="scripts"></a>
<a href="main.php?action=news" onmouseover="changeImg('tutorials', 'gfx/tutorials.gif', 'on');" onmouseout="changeImg('tutorials', 'gfx/gaututorials.gif', 'off');"><img src="gfx/gaututorials.gif" border=0 name="tutorials"></a>
<a href="main.php?action=news" onmouseover="changeImg('misced', 'gfx/misced.gif', 'on');" onmouseout="changeImg('misced', 'gfx/gaumisced.gif', 'off');"><img src="gfx/gaumisced.gif" border=0 name="misced"></a>
<a href="main.php?action=news" onmouseover="changeImg('contacts', 'gfx/contacts.gif', 'on');" onmouseout="changeImg('contacts', 'gfx/gaucontacts.gif', 'off');"><img src="gfx/gaucontacts.gif" border=0 name="contacts"></a> <p>
<img src="gfx/black1px.gif" width=100% height=1>
</td>
</tr>
</table>
<div id="news" style="position:absolute; width:100px; height:100px; left:100px; top:100px; visibility:hidden;">
bla und blub
</div>
<div id="scripts" style="position:absolute; width:100px; height:100px; left:100px; top:100px; visibility:hidden;">
bla und blub
</div>
<div id="tutorials" style="position:absolute; width:100px; height:100px; left:100px; top:100px; visibility:hidden;">
bla und blub
</div>
<div id="misced" style="position:absolute; width:100px; height:100px; left:100px; top:100px; visibility:hidden;">
bla und blub
</div>
<div id="contacts" style="position:absolute; width:100px; height:100px; left:100px; top:100px; visibility:hidden;">
bla und blub
</div>
</body>
</html>