View Full Version : Problem showing picture on Macintosh
zioneer
05-25-2004, 09:57 PM
Hi.
I have a gallery where i use the getElementBiID-procedure to view fullsize picture after klicking the thumb. It works great, until my friend that uses a Mac calls me up and tells me some pictures are stretched horisontally. The ones that are standing...
Check out how it looks at http://www.wallinfoto.se/gal/mac.pdf
The gallery can be seen on http://www.wallinfoto.se/galleri/default.asp?cat=galleri&sport=default
Please help.
Regards, johan.
bradyj
05-25-2004, 10:18 PM
Well, if you notice, non of your img tags have a width or height in them -- this is why safari is rendering them so. Shows up that way in my other browsers as well, except IE. Why aren't you placing the dimensions in them?
It's not a mac issue, it's a browser issue, as a side note, I'm seeing it in some PC browsers as well. We'll get it going though :thumbsup:
zioneer
05-25-2004, 10:27 PM
But how do I implement this in my code?
The images have different widths, and the tag is <img src="x.gif" id="galleryimage">. Im so lost... :confused:
bradyj
05-25-2004, 10:51 PM
I see a lot of image tags in there -- are they served up just with javascript or are they in the asp? If they are just in the javascript, change it to their dimensions:
<img src="bould/Bould-18-L.jpg" width="100" height="200">
Or whatever the dimensions. But if it's in that asp code, we'll have to take a different route.
zioneer
05-25-2004, 11:11 PM
Yes, but those images are the thumbnails... they are supposed to be small... All pictures marked with an "L" are thumbnails...
The full size is called by:
<a href="bould/bould 20.jpg" onclick="return showImage(... etc.
..and the JavaScript does the rest.
(And no, nothing is in the asp on this page...)
Thanks for your patience so far.
/Johan
bradyj
05-25-2004, 11:31 PM
OOh, this is out of my range then, I see it, but I'm not sure how to impliment it -- not a javascript coder myself. You should post into the javascript section (that's how we notice the issues specifically), title it something like 'how to load image with proper dimensions function onClick, please help?'
And then ask those guys how to make it load the image to it's own proper dimensions when it's clicked, I KNOW FOR SURE this is something that can be done, I just don't know how to get around doing it. Sorry, hoped I helped atleast isolate it a bit ;) Any other questions?
]|V|[agnus
05-26-2004, 03:50 AM
I don't know if this is within' JS's grasp, but if you could somehow obtain the image dimensions upon request, you could then write them into the tag dynamically.
Try
- giving dimensions in pixels
'240px','450px' etc.
- using
object.setAttribute('src','newimage.jpg')
instead of
object.src =...
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.