Javascript Popup Images

  Blampish Man 12:43 04 May 2004

I'm new to using Javascript, and can understand the basics, but am having trouble with some images. I basically have thumbnail images on my page, and I got some Javascript to make popup windows with the full size images in, but the code I have only lets me set the size once, so for all of the images on the page the popup window is the same size.

This is the script I got:

SCRIPT language="JavaScript" type="text/javascript">
!-- ;
var newwindow = '
function popitup(url) {

and then this part:

a href="javascript:popitup(image1.jpg')"> img src=image1_t.jpg> /a>

So instead of setting the size I would like to specify the size for each image myself, but when I've tried this it doesn't work.

Can someone help me please.

  rwarrender 07:43 05 May 2004

<SCRIPT language="JavaScript" type="text/javascript">
<!-- ;
function popitup(url,picw,pich) { {,'htmlname','width='+picw+',height='+pich);} }

and then this part:

a href="javascript:popitup('image1.jpg',300,400)"> img src=image1_t.jpg> /a>

I think this should work now so you can resize it. It is annoying that the forums mess up the code :( but email me if you have anymore trouble.

From Richard

This thread is now locked and can not be replied to.

Elsewhere on IDG sites

OnePlus 5 review

See the work of famous artists playing with toys

iPad Pro 10.5in (2017) review

Comment faire une capture d’écran sur un Mac ?