Ich hab da eine Seite auf der ein paar Bilder klein dargestellt werden ( das erste gleichzeitig darunter in groß ), wenn man eins der kleinen anklickt soll es in groß "erscheinen ". Das was ich bisher hab funktioniert in Firefox, im Internet Explorer werden jedoch nur die kleinen Pics angezeigt.
Wißt ihr warum?
Wißt ihr warum?
Code:
<html>
<head>
<script language="JavaScript">
function anzeigen(img)
{
var cb = 300; // container_breite
var ch = 400; // container_hoehe
document.getElementById("anzeige_container").width = cb;
document.getElementById("anzeige_container").height = ch;
var image = new Image();
image.src = img.src;
var b = image.width;
var h = image.height;
var q = b / h; // seitenverhaeltnis = breite / hoehe
if (q >= 1)
{
q = cb / b;
ch = h * q;
image.width = cb;
image.height = ch;
}
else
{
q = ch / h;
cb = b * q;
image.width = cb;
image.height = ch;
}
document.getElementById("anzeige_container").width = image.width;
document.getElementById("anzeige_container").height = image.height;
document.getElementById("anzeige_container").src = image.src;
}
</script>
<title></title>
<base target="_self">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body leftmargin="0" topmargin="0" onload="javascript:bild = new Image();bild.src='images/box1.jpg';anzeigen(bild)">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="ueber2"> </td>
</tr>
<tr>
<td class="ueber5"><div align="center">Gitterboxen</div></td>
</tr>
<tr>
<td class="ueber2"> </td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="ueber2"> </td>
</tr>
<tr>
<div align="center" style="overflow:auto">
<img onclick="javascript:anzeigen(this)" src="images/box1.jpg" width="50" height="50">
<img onclick="javascript:anzeigen(this)" src="images/box2.jpg" width="50" height="50">
</div>
</tr>
<tr>
<div align="center"
<img id="anzeige_container" width="300" height="400"></div>
</tr>
<tr>
<td class="ueber2"> </td>
</tr>
<tr>
<td class="ueber2"><div align="center">auf Anfrage:<br>
Handy: <br>
Tel.: <br>
E-Mail: <a href="mailto:@gmx.de">g@gmx.de</a><br>
Fax:
</div></td>
</tr>
<tr>
<td class="ueber"> </td>
</tr>
</table>
</body>
</html>