/* This script and many more are available free online at
The JavaScript Source!!
http://javascript.internet.com Created by: Jeremy Keith ::
http://www.adactio.com/ */
function doPopups()
{
//alert('dopopups has fired');
if (!document.getElementsByTagName) return false;
var myLink=document.getElementsByTagName("a");
for (var i=0; i < myLink.length; i++)
{
if (myLink[i].className.match("popup"))
{
myLink[i].onclick=function()
{
// Below - to open a full-sized window, just use: window.open(this.href);
window.open(this.href, "", "top=4,left=4,width=800,height=600,scrollbars=yes");
return false;
}
}
}
}
Then... in your html...
you have to add class="popup" to your <a href tags
e.g.<a class="popup"
title="pop up: photo of the Thing"
href="folderName/thingPhoto.html">
<img src="images/theThing.png"
width="128"
height="96"
title="pop up photo of the Thing"
alt="photo of the Thing"></a>
orWe also have a <a class="popup" title="a pop up window showing the thing" href="folderName/theThing.html"> thing </a> to show you