Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need a thumbnail script

Status
Not open for further replies.

rizakag

Technical User
Jun 5, 2001
11
US
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=&quot;Content-Type&quot; content=&quot;text/html; charset=windows-1252&quot;>
<meta http-equiv=&quot;Content-Language&quot; content=&quot;en-us&quot;>
<title>Home Page</title>
<meta name=&quot;GENERATOR&quot; content=&quot;Microsoft FrontPage 4.0&quot;>
<meta name=&quot;ProgId&quot; content=&quot;FrontPage.Editor.Document&quot;>

<!--BEGIN Pop-up Images Script------------------------------------------->
<SCRIPT Language=&quot;JavaScript&quot;>
<!--
// 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 = &quot;popImg&quot;

function openPopImg(picName, windowTitle, windowWidth, windowHeight){
closePopImg()
picTitle = windowTitle
imgWinName = &quot;popImg&quot; + imgCount++ //unique name for each pop-up window
popImg = window.open(picName, imgWinName,
&quot;toolbar=no,scrollbars=no,resizable=no,width=&quot;
+ (parseInt(windowWidth)+20) + &quot;,height=&quot;
+ (parseInt(windowHeight)+15))
}
function closePopImg(){ // close pop-up window if it is open
if (navigator.appName != &quot;Microsoft Internet Explorer&quot;
|| 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=&quot;JavaScript1.1&quot;>
<!--
// 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 = &quot;popImg&quot; + 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 = &quot;toolbar=no,scrollbars=no,resizable=no,width=&quot;
+ windowWidth + &quot;,height=&quot; + windowHeight
return window.open(&quot;pimg.htm&quot;, imgWinName, winFeatures)
}
function winOpen(){
if(popImg != null){
if(popImg.closed != true) return true; else return false
}
else
return false
}
//-->
</SCRIPT>

<SCRIPT Language=&quot;JavaScript1.2&quot;>
<!--
// 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 = &quot;toolbar=no,scrollbars=no,resizable=no,width=&quot;
+ windowWidth + &quot;,height=&quot; + windowHeight
if (leftX>0){
winFeatures += &quot;,screenX=&quot; + leftX + &quot;,left=&quot; + leftX
+ &quot;,screenY=&quot; + topY + &quot;,top=&quot; + topY
}
return window.open(&quot;pimg.htm&quot;, imgWinName, winFeatures)
}
//-->
</SCRIPT>
<!--END Pop-up Images Script-------------------------------------------->



</head>

<BODY onUnload=&quot;closePopImg()&quot;>
<p>&nbsp;</p>
<div align=&quot;center&quot;>
<center>
<table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; width=&quot;100%&quot;>
<tr>
<td width=&quot;25%&quot;></td>
<td width=&quot;39%&quot;></td>
<td width=&quot;36%&quot;></td>
</tr>
<tr>
<td width=&quot;25%&quot;></td>
<td width=&quot;39%&quot;><A HREF=&quot;JAVASCRIPT:eek:penPopImg('QuickStart.gif', 'Quick Start - Conceptual Design', '720', '540')&quot;
onMouseOver=&quot;return setStatus('Click to display picture.')&quot;
onMouseOut=&quot;return setStatus('')&quot;>
<IMG SRC=&quot;images/QuickStart_small.gif&quot; ALT=&quot;QuickStart.gif&quot; width=&quot;180&quot; height=&quot;135&quot;></A></td>
<td width=&quot;36%&quot;></td>
</tr>
</table>
</center>
</div>
</body>

</html>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top