0

Get an error in IE(all). Every other browser handles it fine.

Object doesn't support this action

var process = new $.ProcessingModal({ message: "Saving...", wait: 1000 });
process.open();

basic function setup $.ProcessingModal = function (options) {...}

even tried the Object.create.

If I could only stop supporting IE.

$.ProcessingModal = function (options) {
    // default options
    this.defaultOptions = {
        message: 'Processing...',   // message to appear in the process box.    
        wait: 1000,                 // time to wait before showing.
        timeout: null
    };
    // open the process modal
    this.open = function () {
        var o = this;
        var opts = o.defaultOptions;
        opts.timeout = setTimeout(function () {
            $("#process_Modal").modal({
                modalCss: "modH_adj  modW_5 grey_modal",
                onShow: function (dialog) {
                    SetModalFocus(dialog);
                    $("p#process_message > strong").text(opts.message);
                },
                close: false,
                containerId: 'payce_modal_processing'
            });
        }, opts.wait);

        $('body').ajaxStart(function (opts) {
            closeModal(); //close any modal that maybe open.
        });
        $('body').ajaxComplete(function (opts) {
            o.close(opts);
        });
    };
    this.close = function (opts) {
        if (opts == null)
            opts = this.defaultOptions;
        clearTimeout(opts.timeout);
        $.modal.close();
    };
    // set any options.
    $.extend(this.defaultOptions, options);
};
Yogurt The Wise
  • 4,379
  • 4
  • 34
  • 42
  • Just to note, the error is on the 'var process..' line – Yogurt The Wise Jun 24 '13 at 14:44
  • What's inside `ProcessingModal`? Maybe that's the reason: http://dnasir.com/2012/05/11/object-doesnt-support-this-action-for-in-loop-and-ie/ – basilikum Jun 24 '13 at 15:00
  • I still have no idea why you are getting this. Try to set some breakpoints in your debugger or put in some `console.log`s to see where exactly your error occurs. Did you take a look at the link in my previous comment? Maybe you are using `item` somewhere in your code which seems to cause this kind of error in certain circumstances. – basilikum Jun 24 '13 at 15:24
  • Its breaking right on the 'var process = new...' line. Doe not even go into the code. Tried changing the var names, no luck. – Yogurt The Wise Jun 24 '13 at 15:54
  • That is mysterious. Try to pass just an integer or something else to see if it at least enters the function after that. – basilikum Jun 24 '13 at 16:42

0 Answers0