Script Categories

Page Details >>> Thumbnail Viewer.

Save page space by opening a new window to display larger images on your site when a thumbnail image or a picture text link is clicked. The same window is re-used when the images are the same size.

View the apartment

Step 1: Add the below code to the <body> section of your page:

<script language="javascript" type="text/javascript">      
/* Visit for full source code
and get more free JavaScript, CSS and DHTML scripts! */
<!-- Begin
function ViewImage(ifile,ix,iy,ititle) {
var win;
var sWidth;
var sHeight;
var NS = (document.layers) ? 1 : 0;
win ="","imageviewer","width="+ix+",height="+iy+",menubar=no,toolbar=no");
if (NS) {
sWidth = win.innerWidth;
sHeight = win.innerHeight;
else {
sWidth = win.document.body.clientWidth;
sHeight = win.document.body.clientHeight;
if(sWidth!=ix || sHeight!=iy) {
setTimeout("ViewImage('"+ifile+"',"+ix+","+iy+",'"+ititle+"')", 250);
win.document.write('<div style="position:absolute;width:'+ix+'px;height:'+iy+'px;left:0px;top:0px">');
win.document.write("<img src="+ifile+"></div></body></html>");
//  End -->
<a href="javascript:ViewImage('faces.gif',576,303,'An Apartment')"><img src="faces.gif" width=80 height=80 border=1></a>
<a href="javascript:ViewImage('faces.gif',576,303,'An Apartment')">View the apartment</a>

Step 2: The script uses an images as part of its interface. You can create your own, or use the below (resized for easier download):

(right click image, and select "Save Image As")
Upload it into the same directory as your webpage.

JavaScript Editor Get Advanced
JavaScript and Ajax Editor,
Validator and Debugger!

1st JavaScript Editor.

Code was highlighted by 1st JavaScript Editor (The Best JavaScript Editor!).