S
Silly One
hello all,
i created a page with photo thumbnails on it. what i want
to achieve is that when clicked on a thumbnail, a new
window pops up with a larger image. a javascript is
written as following:
function openImage(imgSrc,imgWidth,imgHeight){
newWindow=window.open
(imgSrc,'newWindow','toolbar=no,width='+imgWidth+',height='
+imgHeight)
newWindow.document.write('<body background="'+imgSrc+'"
onClick="window.close()">')
newWindow.resizeBy(imgWidth-
newWindow.document.body.clientWidth,imgHeight-
newWindow.document.body.clientHeight)
newWindow.focus()
}
however, when i click on the image link, a window with the
larger image does popup along with the parent page with a
larger image. i don't know what i did wrong. also, i'd
like to be able to specify the location of the popup
window, for instance, in the middle of the screen, instead
of anywhere. thank you for any inputs.
i created a page with photo thumbnails on it. what i want
to achieve is that when clicked on a thumbnail, a new
window pops up with a larger image. a javascript is
written as following:
function openImage(imgSrc,imgWidth,imgHeight){
newWindow=window.open
(imgSrc,'newWindow','toolbar=no,width='+imgWidth+',height='
+imgHeight)
newWindow.document.write('<body background="'+imgSrc+'"
onClick="window.close()">')
newWindow.resizeBy(imgWidth-
newWindow.document.body.clientWidth,imgHeight-
newWindow.document.body.clientHeight)
newWindow.focus()
}
however, when i click on the image link, a window with the
larger image does popup along with the parent page with a
larger image. i don't know what i did wrong. also, i'd
like to be able to specify the location of the popup
window, for instance, in the middle of the screen, instead
of anywhere. thank you for any inputs.