views:

10

answers:

1

I just noticed a problem today within IE7 while using the jQuery plugin SimpleModal. I'm not exactly sure what's causing it through. It also doesn't seem to happen with all of my modals only this one. Any ideas on what could be causing it would be great. The error that IE is showing is directly related to SimpleModal's file as well.

Line: 25
Char: 401
Error: 'a.d.overlay' is null or not an object
Code: 0
URL: <REMOVED>

Here is my code that seems to be causing this error to be thrown.

$(".addButton").click(addSymbol);

$(".cancel").live('click',closewindow);

var addMe = function(){
        $(".dialogue").empty();
        $(".dialogue").append('<img src="'+ _baseUrl + '/images/loading-spinner.gif"> Loading...');
        $(".dialogue").modal({
            opacity:80,
            overlayCss: {backgroundColor:"#fff"}
        });
        $.getJSON(
                _Url,
                function(json){
                    if(json.success){
                        refreshTable();
                    } else {
                        $(".dialogue").empty();
                        $(".dialogue").append('<table><tr><td><strong>Error</strong></td></tr><tr><td><b>' + json.error + '</b></td></tr><tr><td></td></tr><tr><td><img src="' + _baseUrl + '/images/bttnClose.png"  class="cancel" /></td></tr></table>');
                    }
                });
    }

var closewindow = function(e){
        e.preventDefault();
        $.modal.close();
    };

As you can see I'm not doing anything special. Please let me know if you have any ideas on what might be causing this.

A: 

According to the Simple Modal code.google page, jQuery 1.4.3 breaks SimpleModal in IE7. You can see the issue here.

I would try switching to jQuery 1.4.2 source and see if that fixes the issue in IE. Otherwise, I would consider switching plugins or working with the plugin writers of SimpleModal to debug the issue.

Moses