Image rotation and dimensions

J

John

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
 
G

Grant Wagner

John said:
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 <[email protected]>

* Client-side Javascript and Netscape 4 DOM Reference available at:
*
http://devedge.netscape.com/library/manuals/2000/javascript/1.3/reference/frames.html

* Internet Explorer DOM Reference available at:
*
http://msdn.microsoft.com/workshop/author/dhtml/reference/dhtml_reference_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-developer/upgrade_2.html
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,900
Latest member
Nell636132

Latest Threads

Top