/    Sign up×
Community /Pin to ProfileBookmark

Popup Image Window, Auto Size??

Hi,

I have a table with a selection of thumbnails all the same size and want each to open a popup window. This is not a problem until I find that one of the images is portrait and all the others are landscape. It still displays but you have to scroll the image.
I have the script in the head with size control which would be ok if all the pics were the same dimension.
Is there a way to make the popup window autosize, ie. to fit the contents?
I’d prefer to keep it as an “image” popup as opposed to an “html” popup.

This is what I have so far:

[CODE]</style>
<script language=”JavaScript”><!–
function popup(image){
cuteLittleWindow = window.open(image, “littleWindow”, “location=no,width=640,height=480,scrollbars=auto”);
}
//–></SCRIPT>[/CODE]

blah…blah…

[CODE]<td align=”center”><a href=”java script:popup(‘paintball/pics/Speedball001.jpg’)”><img src=”paintball/pics/Speedball001_t.jpg” border=”0″ width=”100″ height=”100″></a></td>[/CODE]

Any help appreciated

Cheers

to post a comment
JavaScript

2 Comments(s)

Copy linkTweet thisAlerts:
@WheelzauthorJan 26.2007 — Thanks anyway, I found the answer. ?
Copy linkTweet thisAlerts:
@morekajrJan 05.2008 — How did you get this to happen? I'm having the same problem
×

Success!

Help @Wheelz spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.18,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...