Here is the example of a code that opens a window with an image with specified parameters:
function openImage(name,w,h)
{
& var ImgWin = window.open('', ""+name+"", config="height="+h+",width="+w+"");
& ImgWin.document.write("<HTML><TITLE>" + name + "</TITLE>")
& ImgWin.document.write("<IMG onClick='self.close()' src='Dir/" + name + ".jpg'>")
& ImgWin.document.write("</body></HTML>")
}
To use it, add
onClick="openImage('name','100','200')"
to the current img tag.
Comments
Leave a comment