Forums | MacLife
You are not logged in.
#1 2007-11-19 11:01 pm
JavaScript and image scaling
Firefox likes to shrink a large image to fit the screen (actually kind of nice). User can turn that off in their preferences, but there are still cases when you don't want it.
I think if the dimensions are specified in the tags it doesn't - but if you are opening a new window via JavaScript and just putting the image in it (no html hence no tags), the window will be drawn to specification (as space allows) but the image still gets scaled. Click on it and it expands to the window.
Is that something you can turn off? tell the browser via the JavaScript not to do it?
I think the obvious question everyone has is who takes loaded weapons into a Toys R Us? -- Jim Ferguson
Offline
#3 2007-11-19 11:47 pm
Re: JavaScript and image scaling
Instead of opening a window with just an image, open to a script that just places an image in a plane jane html doc.
So instead of: /images/my_img.jpg
do: /img/my_img.jpg
Have the script reside at /img.php and use mod_rewrite or multiviews to capture the remainder of the url. Complete control, oblivious users.
So, just when did this place get Private Messages? YIKES!
Gippy Pages | Fuzzy Coconut XHTML Widget | PuppyCam
Offline
#4 2007-11-19 11:50 pm
Re: JavaScript and image scaling
OK - so I guess I need to wrap the image in basic html before sending it to a new window. I was kind of hoping I wouldn't have to.
I can understand why you wouldn't want it doing stuff outside of the scope of the html - for security reasons, I just thought maybe there were some hooks for things like that.
I think the obvious question everyone has is who takes loaded weapons into a Toys R Us? -- Jim Ferguson
Offline
#5 2007-11-20 2:42 am
Re: JavaScript and image scaling
I don't know what you're up to exactly, but you've been asking a lot of questions about overriding user preferences, lately. Are you trying to make the world's most annoying web site?
,xtG
.tsooJ
Offline
#6 2007-11-20 4:14 am
Re: JavaScript and image scaling
What have I asked about over riding users preferences?
In this case - a user clicks on a thumbnail to see a large image.
That usually means they want to see a large image (1024x to 1536x). At least I do when I click on a thumbnail that says "click to make big"
Within a document - I like the fact that firefox scales images that don't have image tags. Great for forums. But when the website is an image viewing website, people want to click once (on the thumbnail) to see the full size image - not twice (once on thumbnail, and then once on firefoxes scaled version of the big one)
The only other question that might have had anything to do with users preferences was hiding content under a div with an image. That messed up usability (screwed up search on a doc) so it's a no go, I wanted that to try and bait search engines especially for mis-spelled words.
I think the obvious question everyone has is who takes loaded weapons into a Toys R Us? -- Jim Ferguson
Offline
#7 2007-11-20 10:38 am
Re: JavaScript and image scaling
resedit wrote:
In this case - a user clicks on a thumbnail to see a large image.
That usually means they want to see a large image (1024x to 1536x). At least I do when I click on a thumbnail that says "click to make big"
...
But when the website is an image viewing website, people want to click once (on the thumbnail) to see the full size image - not twice (once on thumbnail, and then once on firefoxes scaled version of the big one)
You don't think that people might want to be able to see the entire thing at once at higher resolution without having to scroll around (for users with smaller screens)?
Offline
#8 2007-11-20 6:10 pm
Re: JavaScript and image scaling
There's a medium resolution button and high resolution button. The medium has a largest dimension of 600 pixels.
I think the obvious question everyone has is who takes loaded weapons into a Toys R Us? -- Jim Ferguson
Offline

