469,642 Members | 1,282 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,642 developers. It's quick & easy.

Image rotation and dimensions

I am rotating images of different dimensions. My problem is that when
a new image is displayed in a new position which had an image of a
different dimension, the old image is first stretched to the dimension
of the new image, before the new image is loaded. How can I stop this
stretching behavior? See the banner images on the right at
http://finialworld.com
thank you
John
Jul 23 '05 #1
1 1843
John wrote:
I am rotating images of different dimensions. My problem is that when
a new image is displayed in a new position which had an image of a
different dimension, the old image is first stretched to the dimension
of the new image, before the new image is loaded. How can I stop this
stretching behavior? See the banner images on the right at
http://finialworld.com

thank you
John


You probably can't elminate it, and I'd suggest the behaviour you're
seeing is probably specific to the user agent (Web browser) you're viewing
it in. Other user agents may exhibit other behaviour (such as "snapping"
the new image and dimensions into place without first distorting the
existing image).

I took a look at the site, and it worked fine for me (I did not see the
behavior you describe) in Internet Explorer. Perhaps it's happening due to
the slowness of dial-up connections. You initiate the code to swap the
image, the image begins to download from the server, the browser reads the
dimensions and changes those before completing the image load.

If that is the case, pre-caching the images in <head></head> will help a
bit, because the images will be loaded before they are needed and should
swap much more quickly the first time.

By the way, your site generates 24 Javascript errors in Firefox, and the
image swap only works once and "View Products By Catalog" doesn't show
anything at all. Netscape 4 shows "Add To Favorites" and "Feedback" and
nothing else on the home page.

You should really consider offering support for browsers other then
Internet Explorer, unless you enjoy insulting your customers by insisting
they use the browser you've picked for them and don't mind losing the
money you could have made selling products to them.

--
| Grant Wagner <gw*****@agricoreunited.com>

* Client-side Javascript and Netscape 4 DOM Reference available at:
*
http://devedge.netscape.com/library/...ce/frames.html

* Internet Explorer DOM Reference available at:
*
http://msdn.microsoft.com/workshop/a...ence_entry.asp

* Netscape 6/7 DOM Reference available at:
* http://www.mozilla.org/docs/dom/domref/
* Tips for upgrading JavaScript for Netscape 7 / Mozilla
* http://www.mozilla.org/docs/web-deve...upgrade_2.html
Jul 23 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

6 posts views Thread by MurrayTh | last post: by
17 posts views Thread by santel_helvis | last post: by
5 posts views Thread by Ricardo Furtado | last post: by
3 posts views Thread by kimiraikkonen | last post: by
2 posts views Thread by Dominic Vella | last post: by
8 posts views Thread by infoseekar | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.