I've spent the past couple of hours searching the web for a thumbnail script, which I thought was going to be easy, and I can't find one that works right. I thought I found one at but when I click on the image, the "Page cannot be displayed" error comes up in the pop-up window. Is this what happens when you're working on your hard drive? Do I need to publish to a server before it will work?
Here's the script:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta http-equiv="Content-Language" content="en-us">
<title>Home Page</title>
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<!--BEGIN Pop-up Images Script------------------------------------------->
<SCRIPT Language="JavaScript">
<!--
// Copyright 1999 - 2001 by Ray Stott, Pop-up Images Script ver 2.0
// OK to use if this copyright is included
// Script is available at
var pic = null
var popImg = null // use this when referring to pop-up image
var picTitle = null
var imgCount = 0
var imgWinName = "popImg"
function openPopImg(picName, windowTitle, windowWidth, windowHeight){
closePopImg()
picTitle = windowTitle
imgWinName = "popImg" + imgCount++ //unique name for each pop-up window
popImg = window.open(picName, imgWinName,
"toolbar=no,scrollbars=no,resizable=no,width="
+ (parseInt(windowWidth)+20) + ",height="
+ (parseInt(windowHeight)+15))
}
function closePopImg(){ // close pop-up window if it is open
if (navigator.appName != "Microsoft Internet Explorer"
|| parseInt(navigator.appVersion) >=4) //do not close if early IE
if(popImg != null) if(!popImg.closed) popImg.close()
}
function setStatus(msg){
status = msg
return true
}
//-->
</SCRIPT>
<SCRIPT Language="JavaScript1.1">
<!--
// for Netscape 3+ and IE 4+
var priorPic = new Array()
var noPic = 0
var foundit = false
function openPopImg(picName, windowTitle, windowWidth, windowHeight){
var i = 0
if(pic == picName && winOpen()){
popImg.focus()
}
else{
foundit = false
for(i=0; i<=noPic; i++){
if (priorPic == picName)
foundit = true
}
pic = picName
closePopImg()
picTitle = windowTitle
imgWinName = "popImg" + imgCount++ //unique name for each pop-up window
if(!foundit){
priorPic[noPic++] = pic
}
popImg = openPopImgWin(imgWinName, windowWidth, windowHeight)
}
}
function openPopImgWin(imgWinName, windowWidth, windowHeight){
var winFeatures = "toolbar=no,scrollbars=no,resizable=no,width="
+ windowWidth + ",height=" + windowHeight
return window.open("pimg.htm", imgWinName, winFeatures)
}
function winOpen(){
if(popImg != null){
if(popImg.closed != true) return true; else return false
}
else
return false
}
//-->
</SCRIPT>
<SCRIPT Language="JavaScript1.2">
<!--
// Use this function to control placement of pop-up window
// in Netscape 4+ and Internet Explorer 4+
function openPopImgWin(imgWinName, windowWidth, windowHeight){
var leftX = 20 // distance of window's left side from left of screen
var topY = 20 // distance of window's top side from top of screen
var winFeatures = "toolbar=no,scrollbars=no,resizable=no,width="
+ windowWidth + ",height=" + windowHeight
if (leftX>0){
winFeatures += ",screenX=" + leftX + ",left=" + leftX
+ ",screenY=" + topY + ",top=" + topY
}
return window.open("pimg.htm", imgWinName, winFeatures)
}
//-->
</SCRIPT>
<!--END Pop-up Images Script-------------------------------------------->
</head>
<BODY onUnload="closePopImg()">
<p> </p>
<div align="center">
<center>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td width="25%"></td>
<td width="39%"></td>
<td width="36%"></td>
</tr>
<tr>
<td width="25%"></td>
<td width="39%"><A HREF="JAVASCRIPTpenPopImg('QuickStart.gif', 'Quick Start - Conceptual Design', '720', '540')"
onMouseOver="return setStatus('Click to display picture.')"
onMouseOut="return setStatus('')">
<IMG SRC="images/QuickStart_small.gif" ALT="QuickStart.gif" width="180" height="135"></A></td>
<td width="36%"></td>
</tr>
</table>
</center>
</div>
</body>
</html>
Here's the script:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta http-equiv="Content-Language" content="en-us">
<title>Home Page</title>
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<!--BEGIN Pop-up Images Script------------------------------------------->
<SCRIPT Language="JavaScript">
<!--
// Copyright 1999 - 2001 by Ray Stott, Pop-up Images Script ver 2.0
// OK to use if this copyright is included
// Script is available at
var pic = null
var popImg = null // use this when referring to pop-up image
var picTitle = null
var imgCount = 0
var imgWinName = "popImg"
function openPopImg(picName, windowTitle, windowWidth, windowHeight){
closePopImg()
picTitle = windowTitle
imgWinName = "popImg" + imgCount++ //unique name for each pop-up window
popImg = window.open(picName, imgWinName,
"toolbar=no,scrollbars=no,resizable=no,width="
+ (parseInt(windowWidth)+20) + ",height="
+ (parseInt(windowHeight)+15))
}
function closePopImg(){ // close pop-up window if it is open
if (navigator.appName != "Microsoft Internet Explorer"
|| parseInt(navigator.appVersion) >=4) //do not close if early IE
if(popImg != null) if(!popImg.closed) popImg.close()
}
function setStatus(msg){
status = msg
return true
}
//-->
</SCRIPT>
<SCRIPT Language="JavaScript1.1">
<!--
// for Netscape 3+ and IE 4+
var priorPic = new Array()
var noPic = 0
var foundit = false
function openPopImg(picName, windowTitle, windowWidth, windowHeight){
var i = 0
if(pic == picName && winOpen()){
popImg.focus()
}
else{
foundit = false
for(i=0; i<=noPic; i++){
if (priorPic == picName)
foundit = true
}
pic = picName
closePopImg()
picTitle = windowTitle
imgWinName = "popImg" + imgCount++ //unique name for each pop-up window
if(!foundit){
priorPic[noPic++] = pic
}
popImg = openPopImgWin(imgWinName, windowWidth, windowHeight)
}
}
function openPopImgWin(imgWinName, windowWidth, windowHeight){
var winFeatures = "toolbar=no,scrollbars=no,resizable=no,width="
+ windowWidth + ",height=" + windowHeight
return window.open("pimg.htm", imgWinName, winFeatures)
}
function winOpen(){
if(popImg != null){
if(popImg.closed != true) return true; else return false
}
else
return false
}
//-->
</SCRIPT>
<SCRIPT Language="JavaScript1.2">
<!--
// Use this function to control placement of pop-up window
// in Netscape 4+ and Internet Explorer 4+
function openPopImgWin(imgWinName, windowWidth, windowHeight){
var leftX = 20 // distance of window's left side from left of screen
var topY = 20 // distance of window's top side from top of screen
var winFeatures = "toolbar=no,scrollbars=no,resizable=no,width="
+ windowWidth + ",height=" + windowHeight
if (leftX>0){
winFeatures += ",screenX=" + leftX + ",left=" + leftX
+ ",screenY=" + topY + ",top=" + topY
}
return window.open("pimg.htm", imgWinName, winFeatures)
}
//-->
</SCRIPT>
<!--END Pop-up Images Script-------------------------------------------->
</head>
<BODY onUnload="closePopImg()">
<p> </p>
<div align="center">
<center>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td width="25%"></td>
<td width="39%"></td>
<td width="36%"></td>
</tr>
<tr>
<td width="25%"></td>
<td width="39%"><A HREF="JAVASCRIPTpenPopImg('QuickStart.gif', 'Quick Start - Conceptual Design', '720', '540')"
onMouseOver="return setStatus('Click to display picture.')"
onMouseOut="return setStatus('')">
<IMG SRC="images/QuickStart_small.gif" ALT="QuickStart.gif" width="180" height="135"></A></td>
<td width="36%"></td>
</tr>
</table>
</center>
</div>
</body>
</html>