"Object Expected" with IE (%$#@)

i have a function called g_checkStatus() that’s inside of an onclick attribute in a div tag. it works perfect in every browser except for IE. with IE i get an “Object Expected” error.

if i replace onclick=“g_checkStatus();” with onclick=“alert(‘testing’);” it works fine in IE. even if i strip the g_checkStatus function of everything and just simply have it trigger an alert() i get the “Object Expected” error, as well.

there’s gotta be something i’m missing, i just don’t know what IE is wanting me to do.

Hard to tell what the problem is if you don’t post your html and javascript code.

Whats in your g_checkStatus() function?

[B]function g_checkStatus() {[/B]
    [COLOR=Gray]/*this.statusDialog = new oldi.statusWindow.dialog();
    this.statusDialog.create(g_checkStatus.arguments);
    this.statusDialog.caller = null;
    this.statusDialog.onShow(g_checkStatus.arguments);*/[/COLOR]
    alert('testing');
[B]}[/B]

[COLOR=Gray]/* located inside a javascript object */
/* all this is doing is creating a grid and i'm adding the onclick event into the <div> */[/COLOR]

loadTriggersComplete: function(type, data)
    {
        // remove rows from Trigger grid
        this.trigGrid.model.clearData();
        this.trigGrid.update();

        if(data)
        {     
            var model = this.trigGrid.model;
            var trigs = [];
            dojo.lang.forEach(data, function(stats)
            {
                var oc1 = 'onclick="g_checkStatus(\\'trigger\\', \\'' + stats.Name + '\\', \\'' + stats.CompareTag1REC + '\\', \\'' + stats.CompareTag1ErrStr + '\\', \\'' + stats.CompareTag1EH1 + '\\', \\'' + stats.CompareTag1EH2 + '\\', \\'' + stats.CompareTag1EH3 + '\\', \\'' + stats.CompareTag1EH4 + '\\', \\'' + stats.CompareTag1EH5 + '\\', \\'' + stats.CompareTag1EH6 + '\\', \\'' + stats.CompareTag1EH7 + '\\', \\'' + stats.CompareTag1EH8 + '\\', 1);"';
                var oc2 = 'onclick="g_checkStatus(\\'trigger\\', \\'' + stats.Name + '\\', \\'' + stats.CompareTag2REC + '\\', \\'' + stats.CompareTag2ErrStr + '\\', \\'' + stats.CompareTag2EH1 + '\\', \\'' + stats.CompareTag2EH2 + '\\', \\'' + stats.CompareTag2EH3 + '\\', \\'' + stats.CompareTag2EH4 + '\\', \\'' + stats.CompareTag2EH5 + '\\', \\'' + stats.CompareTag2EH6 + '\\', \\'' + stats.CompareTag2EH7 + '\\', \\'' + stats.CompareTag2EH8 + '\\', 2);"';
                
                var compTag1 = (stats.CompareTag1EF > 0) ? '<div ' + oc1 +' id="' + stats.Name + '_Tag1" class="cell-button-red">Status</div>' : '<div ' + oc1 +' id="' + stats.Name + '_Tag1" class="cell-button-gray">Status</div>';
                var compTag2 = (stats.CompareTag2EF > 0) ? '<div ' + oc2 +' id="' + stats.Name + '_Tag2" class="cell-button-red">Status</div>' : '<div ' + oc2 +' id="' + stats.Name + '_Tag2" class="cell-button-gray">Status</div>';
                var esf = (stats.ErrorStateFlag > 0) ? 'True' : 'False';
                var newRowData = [stats.Name, stats.ExeCnt, stats.IoErrCnt, stats.AvgExeMs, stats.MinExeMs, stats.MaxExeMs, stats.AvgCycleMs, stats.MinCycleMs, stats.MaxCycleMs, esf, compTag1, compTag2];
                
                model.insert(newRowData, model.count);
                trigs.push([stats.Name, stats.ExeCnt]);
            });
            this.trigGrid.update();
        }
        else
        { 
            dojo.debug("Error: Unable to get Trigger Status!");
        }
    },

i will comment out everything in the function and just put alert(‘testing’); and it still gives me that error; so i don’t think it’s what’s inside that’s causing the issue. it seems IE is maybe not loading the function before it’s called, but the function is at the top of the page and you can’t activate the onclick event until it’s loaded on the page…so that doesn’t really make sense.

very frustrating indeed.