Hallo!
Da haben wir offensichtlich mal wieder nicht den Code gezeigt bekommen, der den Fehler produziert.
Doch! Ich habe euch den kompletten Code gezeigt. Mehr hatte ich zu dem Zeitpunkt noch nicht. Und auch den genauen Wortlaut. Aber die Konsole ist komisch, da sie Zeile1 als Fehlerzeile angibt. Was ja definitiv nicht der Fall ist.
Aber jetzt habe ich ein neues Problem. Ich würde gerne bei dem MouseoverEffekt nicht nur den jeweiligen Button verändern, sondern auch noch ein bestimmtes Bild. Das src-Attribut des Bildes soll bei jedem Mouseover und Mouseout verändert werden.
Hier der Quelltext:
<html>
<head>
<title>Untitled</title>
<script type="text/javascript">
function show_top_img(box){
document.getElementById("head").src = "bilder/" + box + "_top_img.jpg";
document.getElementById(box).src = "bilder/" + box + "_hover.png";
}
function hide_top_img(box){
document.getElementById("head").src = "bilder/top_img1.png";
document.getElementById(box).src = "bilder/" + box + ".png";
}
</script>
</head>
<body>
<div style="width:699px; margin:0 auto 0 auto;">
<div style="float:left; margin:0; padding-top:1px;">
<img src="bilder/top_img1.jpg" id="head" width="549" height="288" alt="Tarot - Der Weg des Lebens" title="Tarot - Der Weg des Lebens">
</div>
<div style="margin-right:0; padding:0; background-color:#FFFFFF;">
<img src="bilder/gal.png" id="gal" width="150" height="96" onmouseover="show_top_img('gal')" onmouseout="hide_top_img('gal')" alt="" style="margin-right:0; padding-right:0; text-align:right;">
<img src="bilder/scripts.png" id="scripts" width="150" height="96" onmouseover="show_top_img('scripts')" onmouseout="hide_top_img('scripts')" alt="" style="margin-right:0; padding-right:0; padding-top:1px; text-align:right;">
<img src="bilder/art.png" id="art" width="150" height="96" onmouseover="show_top_img('art')" onmouseout="hide_top_img('art')" alt="" style="margin-right:0; padding-right:0; padding-top:1px; text-align:right;">
</div>
</div>
</body>
</html>
Vielen vielen Dank für eure Hilfe!
Liebe Grüße, Markus