Closed Thread Icon

Topic awaiting preservation: Reading Image Dimentions Pages that link to <a href="https://ozoneasylum.com/backlink?for=8259" title="Pages that link to Topic awaiting preservation: Reading Image Dimentions" rel="nofollow" >Topic awaiting preservation: Reading Image Dimentions\

 
Author Thread
Petskull
Maniac (V) Mad Scientist

From: 127 Halcyon Road, Marenia, Atlantis
Insane since: Aug 2000

posted posted 08-12-2002 12:05

I want to pop up a window that is exactly as big as the image it contains.

Is there any way for JS or some sort of DHTML magic to to read the image dimentions so I can input them as the height and width of the popup?


Code - CGI - links - DHTML - Javascript - Perl - programming - Magic - http://www.twistedport.com
ICQ: 67751342

Hugh
Paranoid (IV) Inmate

From: Dublin, Ireland
Insane since: Jul 2000

posted posted 08-12-2002 14:16

I really dont think so, but I suppose if you displayed the image in an invisible div and then got its width after theimage.complete you'd be able to have it then. But as for a command that reads anything server side in js, it doesnt really exist.

Emperor
Maniac (V) Mad Scientist with Finglongers

From: Cell 53, East Wing
Insane since: Jul 2001

posted posted 08-12-2002 14:53

PS: Have a look at briggl's 'Image Display' quick tip (bottom left):
www.gurusnetwork.com/tutorials/coding.html

but you'd be better using something server-side like:
www.php.net/manual/en/function.getimagesize.php

___________________
Emps

FAQs: Emperor

kuckus
Bipolar (III) Inmate

From: Berlin (almost)
Insane since: Dec 2001

posted posted 08-12-2002 14:57

I didn't have a look at the code to see how he's done it yet, but Bugimus has a script on his site that will do the trick:
http://www.bugimus.com/gurus/image_popup/imagepopup.html

And apart from that, there's also a tutorial by Briggl at the GN:
http://www.gurusnetwork.com/tutorials/javascript/imagedisp/imagedisp1.html

kuckus (cell #282)

[This message has been edited by kuckus (edited 08-12-2002).]

Petskull
Maniac (V) Mad Scientist

From: 127 Halcyon Road, Marenia, Atlantis
Insane since: Aug 2000

posted posted 08-12-2002 17:09

whoa.... I just spent a long as time reading those pages and the only thing I understood well is why Bugimus and Briggl are truely Gurus.... I'll keep tossing it at my brain until some of it sticks...

...this is really good stuff...


Code - CGI - links - DHTML - Javascript - Perl - programming - Magic - http://www.twistedport.com
ICQ: 67751342

[This message has been edited by Petskull (edited 08-12-2002).]

« BackwardsOnwards »

Show Forum Drop Down Menu