-
I'm trying to find a JS
that opens an image in a new window when a link is clicked. Just the image
only, not an html page. It would be really cool if the new window was the exact
dimensions of the image with no scroll bars, status bars, tool bars, etc. Any
ideas?
I know browsers read the dimensions of images somehow because if you open just
an image by itself in a window (not in an html page), the pixel dimensions are
displayed in the title bar. These dimensions must be able to be accessed/read
somehow via JavaScript and incorporated into the dimensions of the new window
being opened. What do you think?
-
Well I am not sure how to read the iage dimensions with javascript but I have done this very thing using a server side technology like PHP to get the dimensions of the image then dynamically create the dimesions for the popup command. If you have access to php and want to know how to do it please let me know at freddy@bereminded.com
-
Is the image going to always be the same? If it is, you
don't need JavaScript to find the dimensions. Just find
the dimensions yourself, then set the window to open to
a certain width and height.
I wrote a JavaScript tutorial on Pop-Up Windows at the
following address.
http://www.freejavahelp.com/tutorial...ipt/popup.html
If you have trouble with it, let me know, and i would be willing to help you.
Jim