Skip to main content
Participant
November 20, 2012
Question

Imageresize causing an Internet Explorer cannot display the webpage error (IE8)

  • November 20, 2012
  • 1 reply
  • 657 views

Hi

I have a simple application that uploads an image and resizes it if its too large. It works great on all browsers apart from IE (testing in IE8). When I disable the resize code, it works ok. If I leave the imageresize code in I receive a 'Internet Explorer cannot display the webpage error'. Does anyone have any idea what is causing this or how to find out more about the error?

The resize code is below:

if (myImageInfo.width < maxWidth) {

                        ImageResize(myImage,maxWidth,"");   

                        myImageInfo=imageInfo(myImage);

                        if (myImageInfo.height<maxHeight) {

                            ImageResize(myImage,"",maxHeight);   

                            myImageInfo=imageInfo(myImage);

                        }

                    } else if (myImageInfo.width > maxWidth) {

                        ImageResize(myImage,maxWidth,"");   

                        myImageInfo=imageInfo(myImage);

                        if (myImageInfo.height<maxHeight) {

                            ImageResize(myImage,"",maxHeight);

                            myImageInfo=imageInfo(myImage);   

                        }

                    }

Cheers


Shaun

    This topic has been closed for replies.

    1 reply

    Miguel-F
    Inspiring
    November 20, 2012

    Your example code is missing.

    Participant
    November 20, 2012

    Oops!

    if (myImageInfo.width < maxWidth) {

                            ImageResize(myImage,maxWidth,"");   

                            myImageInfo=imageInfo(myImage);

                            if (myImageInfo.height<maxHeight) {

                                ImageResize(myImage,"",maxHeight);   

                                myImageInfo=imageInfo(myImage);

                            }

                        } else if (myImageInfo.width > maxWidth) {

                            ImageResize(myImage,maxWidth,"");   

                            myImageInfo=imageInfo(myImage);

                            if (myImageInfo.height<maxHeight) {

                                ImageResize(myImage,"",maxHeight);

                                myImageInfo=imageInfo(myImage);   

                            }

                        }