/    Sign up×
Community /Pin to ProfileBookmark

Resolution dependant image popup

I’m using a simple JavaScript to pop up an image window when a thumbnail image is clicked on. Some of the full-size images are fairly large (e.g. 650×900 pixels) which isn’t a problem as long as the monitor resolution is high enough. The problem occurs when using a low res monitor setting (I’d like to site to work properly on all resolutions from 800×600). What currently happens with a low res monitor depends on the browser. The image is either scaled down in size (Mac Camino) or the popup window is larger than the available screen space so part of the image is off the screen (Windows IE).

What I’d like to have happen is to have the full image displayed if the monitor resolution is high enough but with a low res monitor the popup window is scaled so that it fits the screen properly and scoll bars are added so that the entire full-size image can be seen. In no case do I want the image to be scaled or have the pop-up window be larger than the display area.

Please excuse me if this is not clear. If you’d like to see an example, take a look at [url]http://e-gallery.ca/plain/browse.html[/url] and click on the 1st thumbnail in the 1st row or the 3rd thumbnail in the 2nd row.

to post a comment
JavaScript

2 Comments(s)

Copy linkTweet thisAlerts:
@Bog_ZaicevJun 19.2006 — [CODE]
<script>
alert(screen.height + ' x '+screen.width)
</script> [/CODE]
Copy linkTweet thisAlerts:
@richardSauthorJun 19.2006 — [CODE]
<script>
alert(screen.height + ' x '+screen.width)
</script> [/CODE]
[/QUOTE]

If that is supposed to be a solution to my problem, I'm sorry but I don't understand. Can someone explain how this works?
×

Success!

Help @richardS 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.17,
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,
)...