pop-up window for image link

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.
 
J

Jens Peter Karlsen[FP MVP]

To achieve, place the picture on a html page and position as you like,
then open this html file in the popup.

Regards Jens Peter Karlsen. Microsoft MVP - Frontpage.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top