Page 1 of 1

Autoresizable image popup

Posted: Tue Mar 14, 2006 9:37 am
by Ree
I have quicly wrote this:

Code: Select all

function showImage(image_url)
{
  var picture = new Image();
  picture.src = image_url;
  window.open(image_url, '', 'width='+picture.width+', height='+picture.height+', scrollbars=0');
}
It works ok with IE, but Firefox displays some margin around the image. How do I get rid of it?

Posted: Tue Mar 14, 2006 10:00 am
by pickle
Firefox resizes images to fit inside their window. That might be what's doing it.

It also looks like you haven't turned off toolbars and the status bar. Both of those will eat into your dimensions.

Posted: Tue Mar 14, 2006 10:14 am
by Ree
Firefox does not resize images. Also the toolbar isn't displayed. Status bar shouldn't be a problem either.