On Sun, 29 Feb 2004 13:07:00 -0500, Ryan Sullivan
<rp******@yourrobe.wideopenwest.com> wrote:
I have been struggling mightily in getting this to work with the scripts
I have seen. I have an image map that uses overlib to display
information about a school's campus:
http://dcavello.phenominet.com/about/tour.php
I would like onClick to generate a series of thumbnails located directly
above or below the image map. Those thumbnails would then be linked to
larger images which would pop-up in a new browser window. Does anyone
know of a javascript utility that I could use for this? I am not all
that familiar with Javascript, otherwise I would write my own utility.
Thanks for any help you can offer.
Ryan
The script below creates two images (named 1.jpg and 2.jpg) under the
"click here for images" text. You can change that by
moving the <div id="pictures"></div> tag around.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script type="text/javascript">
<!--
var pic1 = new Image();
pic1.src = "1.jpg";
var pic2 = new Image();
pic2.src = "2.jpg";
function doIt() {
var out = new String("<img src=" + pic1.src + "><img src=" + pic2.src
+ ">");
var location = document.getElementById("pictures");
location.innerHTML = out;
}
-->
</script>
</head>
<body>
<div onClick="doIt();">click here for images</div>
<br>
<div id="pictures"></div> <!-- place this wherever you like -->
</body>
</html>
Enjoy, Buba