Search results for 'Javascript Thumbnail Viewer'. 1 post(s) found.
2009/08/28 08:01
Photo thumbnail viewer implement in javascript
2009/08/28 08:01 in HTML, Javascript

When you navigate internet shopping mail, you can easily see the Photo Viewer to see the magnified big picture for the sales product. Following example is showing the photo thumbnail without additional pages on server.
Actually there is no additional server page so this is really efficient than others.
<HEAD>
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
function ViewImage(ifile,ix,iy,ititle) {
var win;
var sWidth;
var sHeight;
var NS = (document.layers) ? 1 : 0;
win = window.open("","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) {
win.close();
setTimeout("ViewImage('"+ifile+"',"+ix+","+iy+",'"+ititle+"')", 250);
return;
}
win.document.open();
win.document.write("<html><head><title>"+ititle+"</title>");
win.document.write("</head><body>");
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>");
win.document.close();
}
// End -->
</script>
</HEAD>
<BODY>
<a href="javascript<b></b>:ViewImage('fullsizeimage.jpg',576,303,'Picture description')"><img src="thumbsizesmall.jpg" width=288 height=152 border=1></a>
</body>
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
function ViewImage(ifile,ix,iy,ititle) {
var win;
var sWidth;
var sHeight;
var NS = (document.layers) ? 1 : 0;
win = window.open("","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) {
win.close();
setTimeout("ViewImage('"+ifile+"',"+ix+","+iy+",'"+ititle+"')", 250);
return;
}
win.document.open();
win.document.write("<html><head><title>"+ititle+"</title>");
win.document.write("</head><body>");
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>");
win.document.close();
}
// End -->
</script>
</HEAD>
<BODY>
<a href="javascript<b></b>:ViewImage('fullsizeimage.jpg',576,303,'Picture description')"><img src="thumbsizesmall.jpg" width=288 height=152 border=1></a>
</body>
Another posts included in "HTML, Javascript"
| To get web browser capability (0) | 2009/08/28 |
| Javascript based query parser for AJAX application (0) | 2009/08/28 |
| Displays the html tags without rendering on a webpage (0) | 2009/08/28 |
| Javascript Confirmation (0) | 2009/08/22 |
| Javascript Prompts (0) | 2009/08/22 |
| How to know browser version in javascript ? (0) | 2009/08/22 |
| How to know the browser name in Javascript ? (0) | 2009/08/22 |
| Select All, None, Invert checkbox (0) | 2009/08/21 |
Prev

Rss Feed