5

I'm getting following error when using IE 9 (Chrome and FireFox works great):

SCRIPT438: Object doesn't support property or method 'removeExpression' jquery.simplemodal.1.4.2.min.js, line 16 character 133

Simple Modal is called inside Iframe. jQuery.min (1.7.1) is included before SimpleModal (1.4.2) in the Iframe.

The code responsible for showing modal dialog:

function OpenContextByClass(cssClass, posY, posX) {
    var winHeight = $(window).height();
    var winWidth = $(window).width();

    $('.' + cssClass).modal({
        overlayClose: true,
        position: [posY, posX],
        appendTo: 'form',
        onOpen: function (dialog) { dialog.overlay.fadeIn('fast', function () { dialog.container.slideDown('fast', function () { dialog.data.fadeIn('fast'); }); }); },
        onShow: function (d) {
            var self = this;
            self.container = d.container[0];
            var title = $('.' + cssClass, self.container);
            title.show();
            $('.' + cssClass, self.container).show();

            setTimeout(function () {
                var currentPositionX = posX;
                var currentPositionY = posY;
                var currentWidth = $('.' + cssClass, self.container).width() + 50;
                var currentHeight = $('.' + cssClass, self.container).height() + 50;
                posY = (currentPositionY + currentHeight) < winHeight ? currentPositionY : (winHeight - currentHeight);
                posX = (currentPositionX + currentWidth) < winWidth ? currentPositionX : (winWidth - currentWidth);

                d.container.animate(
                                { left: posX, top: posY },
                                500,
                                function () {
                                    $('.' + cssClass, self.container).show();
                                }
                            );
            }, 550);
        }
    });
}
Ranaghar
  • 51
  • 1
  • 4
  • Simple Modal works fine for me in IE9 with jQuery 1.7.1, but breaks when I upgrade jQuery to 1.8.0. Are you certain that you were using 1.7.1? – Eric J. Aug 20 '12 at 22:32
  • 2
    I opened a similar but slightly different issue http://stackoverflow.com/q/12046242/141172 – Eric J. Aug 20 '12 at 22:51
  • @Eric J. I don't have access to project now. But I think it was 1.7.1. – Ranaghar Aug 29 '12 at 12:43
  • 2
    This question has been answered by the developer. http://stackoverflow.com/questions/12046242/simple-modal-jquery-1-8-0-and-ie9 – Justin Sep 05 '12 at 14:23

1 Answers1

1

I have got the same problem. And I found this article: http://help.dottoro.com/ljuvxilu.php

The support for dynamic properties has been removed in Internet Explorer 9, so none of the getExpression, removeExpression, setExpression and recalc methods are supported. These methods exist in version 8, but using them raises exceptions.

AlexeiBerkov
  • 427
  • 1
  • 6
  • 16