Hi I am loading an image like this:

this.imageTest = new Asset.images(this.imgPath,
        {
                onComplete: function()
                {
                   this.imageTest[0].injectTop(this.container);
                }
        });

If the image is 800 X 600, IE will work properly. If I change the
image on the server to to 400 X 300, IE will download the correct
image, but it will stretch it out to 800 X 600.

I have tried this method:

http://social.msdn.microsoft.com/forums/en-US/iewebdevelopment/thread/0251a835-e1a7-481c-8ad1-bde1f69b8e89/

but obj = document.createElement("<img src='test1.gif'>"); kills the
script for me.

I have also tried(inside the onComplete: function() ):

this.ImgToLoad = new Element('img',
{
     'src': this.imgPath
});
this.ImgToLoad.injectTop(this.container);

The strange thing is if I browse to the image on the server IE
displays it correctly, and if the image is loaded from the html it
displays correctly. When it is loaded with javascript IE gets the
imgsize from a couple of days ago, regardless of the size of the image
in the cache.

Does anyone have any ideas how to get around this bug,

Thanks,

Matt.

Reply via email to