well, you can do a couple things. the easier, of course would be to use server-side such as ASP or PHP and pass the image path along the URL. Then you can use HTML to define your page and the image tag would be something like,
<img src="<?= $_GET["imagePath"]?>"> in PHP
<img src="<%= request.queryString("imagePath")%>"> in ASP
of course, you will need the width and height attributes, so it may be wise to send those as well.
If you are not using any server-side then you can use javascript in a couple ways.
1, is to follow the same example as above, but use this function to get url variables,
Code:
location.getVar = function(getVar) {
var oRegExp = new RegExp(getVar +"=([^&.]+)", "i");
if (!oRegExp.test(this.href)) return false;
oRegExp.exec(this.href);
return RegExp.$1;
}
document.write("<img src=\""+ location.getVar("imagePath") +"\">");
2, is to generate the window completely via javascript
Code:
var thumbNailWin = null;
function generateWindow(imagePath, width, height) {
if (!thumbNailWin || thumbNailWin.closed)
thumbNailWin = window.open("about:blank", "thumbNailWin", "width="+ width +",height="+ height +",status=0,menubar=0");
else
thumbNailWin.location.href = "about:blank"; // to clear the html (we are using the same window each time)
thumbNailWin.document.write("<html><head><title>my title</title></head><body style=\"margin:0px; overflow:hidden;\">");
thumbNailWin.document.write("<img src=\""+ imagePath +"\" width=\""+ width +"\" height=\""+ height +"\">");
thumbNailWin.document.write("</body></html>");
thumbNailWin.focus();
thumbNailWin.resizeTo(width, height); // resize the window
}