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

iPhone X review

Political cartoons in 2017: Chris Riddell, Rebecca Hendin and Dave Brown on what it’s like to…

The best iPhone for 2017

Tennis : comment regarder la finale de la Coupe Davis 2017 ?