 |

leeshields
User
Aug 14, 2002, 3:22 AM
Post #1 of 4
(3527 views)
Shortcut
|
I read a much earlier thread about popup windows and you had included a script to make a popup rather than a new full browser window. The problem is with size, it looks a bit sloppy with different aspect ratio images setting a fixed window size, is there any way to get the windows to size to the graphic much as justsopopup (a dreamweaver extension) does? The problem with using that is that the script measures the graphics on setting the behaviour and not on display. Any suggestions? Lee
|
|
|  |
 |

Damon
Staff
/ Moderator

Aug 16, 2002, 3:43 PM
Post #2 of 4
(3486 views)
Shortcut
|
|
Re: [leeshields] Popup windows
[In reply to]
|
Can't Post
|
|
Hi Lee, I don't know of a way to dynamically resize a popup window to an images size so I searched Google.com for the key words "Javascript dynamically resize popup window for images" and found some Javascript. Here is the link: http://developer.irt.org/script/686.htm **Update** - unfortunately I had no success with the javascript code at this link so I am on the look out for code that will work. If anyone else has come across a nice way to automatically resize a popup window to an image size, please post it here. Thanks :) Cheers Damon Edis interactivetools.com
(This post was edited by Damon on Sep 10, 2002, 11:26 AM)
|
|
|  |
 |

Dave
Staff
/ Moderator

Aug 19, 2002, 1:05 AM
Post #3 of 4
(3479 views)
Shortcut
|
|
Re: [leeshields] Popup windows
[In reply to]
|
Can't Post
|
|
I was just about to answer this, but my answer was the same as Damon's javascript code. :) There's basically two ways: a) detect the size of the image with javascript and resize the window. b) hardcode the width of the image (not height) and let the browser resize it to fit in the window. The only problem with this is small images will be enlarged and may look pixelated. Dave Edis - Senior Developer interactivetools.com
|
|
|  |
 |

chrisl
User
Sep 3, 2002, 2:25 PM
Post #4 of 4
(3065 views)
Shortcut
|
Hi, Re: Pop Up Image Windows I have had success with coding the _publish_listing.html template to reflect the Dreamweaver "justso photo" requirements by moving the vwd_justso.htm & vwd_justsopw.js files over to the /rm/listings/ directory and then hardcoding the following into the _publish_listing.html template: <head> <script src="vwd_justsopw.js" language = "JavaScript"></script> </head> <body> <!-- templatecell : image --> <a href="javascript:;" onClick="JustSoPicWindow('./images/$file$','432','288','* * Click window to close * * ','#FFFFFF','hug image','20')"><img src="./images/$file$" border=0 width=150 alt="Photo"></a><br> <font face="ms sans serif" size=1>$desc$</font><br> <!-- /templatecell : image --> The only issue here is that you must upload images which would show well in the defined width & height statements ./images/$file$','432','288',' as above. Anyone have a way of coding this to auto-size the image??? Thanks Chris
(This post was edited by chrisl on Sep 4, 2002, 11:11 AM)
|
|
|  |
 | |  |
|