nicolasottawa
Technical User
This script works in all browsers but in Firefox. I am sure from reading blogs and such that it has something to do with the .innerHTML and the <div> tags but i cannot get it to work no matter what I do. This should allow for a thmbnail on the left side and when one clicks on it, a larger image opens on the left. Can someone help?
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"<html xmlns=" lang="en" xml:lang="en">
<head>
<title>Untitled</title>
</head>
<body>
<script language="JavaScript1.2" type="text/javascript">
<!--
function newWin(thePage,wt,ht,theName){
document.getElementById("imageLoader").innerHTML = "<img src='"+thePage+"' width='"+wt+"' height='"+ht+"'>";
}
// -->
</script>
</head>
<div style="float: left; vertical-align:top;"> <!--this is the list of thumbnails-->
<a href="javascript: newWin('images/item/32.jpg',132,300,'IMAGE_32.jpg');"><img src="album-e.php?pic=images/item/32.jpg"></a>
<a href="javascript: newWin('images/item/30.jpg',151,300,'IMAGE_30.jpg');"><img src="album-e.php?pic=images/item/30.jpg"></a>
<a href="javascript: newWin('images/item/31.jpg',116,300,'IMAGE_31.jpg');"><img src="album-e.php?pic=images/item/31.jpg"></a>
<a href="javascript: newWin('images/item/33.jpg',300,228,'IMAGE_33.jpg');"><img src="album-e.php?pic=images/item/33.jpg"></a>
<a href="javascript: newWin('images/item/34.jpg',300,269,'IMAGE_34.jpg');"><img src="album-e.php?pic=images/item/34.jpg"></a>
</div>
<!--this is where the larger image should appear-->
<div id="imageLoader" style="float: left; vertical-align:top;"></div>
</body>
</html>
many thanks in advance
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"<html xmlns=" lang="en" xml:lang="en">
<head>
<title>Untitled</title>
</head>
<body>
<script language="JavaScript1.2" type="text/javascript">
<!--
function newWin(thePage,wt,ht,theName){
document.getElementById("imageLoader").innerHTML = "<img src='"+thePage+"' width='"+wt+"' height='"+ht+"'>";
}
// -->
</script>
</head>
<div style="float: left; vertical-align:top;"> <!--this is the list of thumbnails-->
<a href="javascript: newWin('images/item/32.jpg',132,300,'IMAGE_32.jpg');"><img src="album-e.php?pic=images/item/32.jpg"></a>
<a href="javascript: newWin('images/item/30.jpg',151,300,'IMAGE_30.jpg');"><img src="album-e.php?pic=images/item/30.jpg"></a>
<a href="javascript: newWin('images/item/31.jpg',116,300,'IMAGE_31.jpg');"><img src="album-e.php?pic=images/item/31.jpg"></a>
<a href="javascript: newWin('images/item/33.jpg',300,228,'IMAGE_33.jpg');"><img src="album-e.php?pic=images/item/33.jpg"></a>
<a href="javascript: newWin('images/item/34.jpg',300,269,'IMAGE_34.jpg');"><img src="album-e.php?pic=images/item/34.jpg"></a>
</div>
<!--this is where the larger image should appear-->
<div id="imageLoader" style="float: left; vertical-align:top;"></div>
</body>
</html>
many thanks in advance