Preserved Topic: Pop-up window |
|
---|---|
Author | Thread |
Obsessive-Compulsive (I) Inmate From: |
posted 10-03-2001 04:44
Is it possible to have a pop-up window dynamical resize according the the image that it loads ? the image is being pulled from a database and the dimensions of the image isn't in the database. |
Maniac (V) Inmate From: Brisbane, Australia |
posted 10-03-2001 06:19
If the server-side language your using can get the image dimensions then you could use those valuse in the popup code, apart fom that I'm not too sure... |
Maniac (V) Mad Scientist From: New California |
posted 10-03-2001 13:42
I started playing around with this concept and here's what I came up with: http://bugimus.com/gurus/image_popup/imagepopup.html |
Maniac (V) Mad Scientist with Finglongers From: Cell 53, East Wing |
posted 10-03-2001 14:05
jediblah: I don't have the exact code on me here but I do something similarish. It depends on what your server side scripting can do but you can get the image from the database and if you can't automatically get the image height and width (as you can in PHP) then you'll need to add this to the database and grab them at the same time you get the image. Then stick something like this in the BODY tag onload="window.resizeTo($height,$width);" |
Paranoid (IV) Inmate From: Lebanon |
posted 10-04-2001 07:45
I would go for javascript approach...but this will only work w/ IE, netscape, you have to make something else.... code: var myimage = new Image;
|