日期:2014-05-17  浏览次数:20646 次

ExtJs在LOAD的时候就出错? 急.....!!!
我做一个GridPanel在运行的时候.IE就提示我出错 "Microsoft JScript 运行时错误: 对象不支持此属性或方法"

以下这段是出错的地方..是 extjs-all-debug.js

JScript code


function addLoadEvent(fn) {
        if (typeof win.addEventListener != UNDEF) {
            win.addEventListener("load", fn, false);
        }
        else if (typeof doc.addEventListener != UNDEF) {
            doc.addEventListener("load", fn, false);
        }
        else if (typeof win.attachEvent != UNDEF) {
            addListener(win, "onload", fn);
        }
        else if (typeof win.onload == "function") {
            var fnOld = win.onload;
            win.onload = function() {
                fnOld();
                fn();
            };
        }
        else {
            win.onload = fn;
        }
    }







我的代码是

JScript code


Ext.onReady(function() {
    var gridDtl;
    var myStore = new Ext.data.JsonStore({
        autoLoad: true,
        proxy: new Ext.data.HttpProxy({
            url: 'PttGetData.asmx/qryCancelableById',
            headers: { 'Content-type': 'application/json' }
        }),
        baseParams: { id: 'aa' },
        root: 'd',
        fields: ['TermId', 'MsgTime', 'CardId', 'SimNo', 'ShiftSN', 'CmdType', 'CmdMsg', 'IsSucc', 'T_isRec', 'T_IsCommit', 'SendTime', 'RecvTime', 'CommitTime']
    });

    var grid = new Ext.grid.GridPanel({
        store: myStore,
        columns: [
                               { header: "信息收发时间", width: 300, renderer: rendeDate, dataIndex: 'MsgTime' },
                               { header: "终端号", width: 150, dataIndex: 'TermId' },
                               { header: "车牌号", width: 150, dataIndex: 'CardId' },
                               { header: "终端sim卡号", width: 200, dataIndex: 'SimNo' },
                               { header: "作业流水号", width: 200, dataIndex: 'ShiftSN', sortable: true },
                               { header: "命令类型", width: 150, dataIndex: 'CmdType', sortable: true },
                               { header: "命令信息内容", width: 200, dataIndex: 'CmdMsg', sortable: true },
                               { header: "收发是否成功", width: 200, dataIndex: 'IsSucc', sortable: true },
                               { header: "终端是否收到", width: 200, dataIndex: 'T_isRec', sortable: true },
                               { header: "终端是否人工确认", width: 200, dataIndex: 'T_IsCommit', sortable: true },
                               { header: "下发时间", width: 300, renderer: rendeDate, dataIndex: 'SendTime', sortable: true },
                               { header: "接收时间", width: 300, renderer: rendeDate, dataIndex: 'RecvTime', sortable: true },
                               { header: "人工确认时间", width: 300, renderer: rendeDate, dataIndex: 'CommitTime', sortable: true }

                    ],
        viewConfig: { forceFit: true },
        width: 1280,
        height: 250,
        split: true,
        buttons: [{ text: '核销', handler: OnCav}],
        renderTo: 'CAV',
        frame: true
    });



    function rendeDate(record) {
        var strDate = "new " + record.substr(1, record.length - 2)
        return eval("(" + strDate + ")").toLocaleString();
    }
});  







我要从这边传参进去web service.. 但是.在一开始load的时候就出错了. .
但是如果我用FIRE FOX的话.就可以把参数传进去. 但是却不能显示任何东西.. 


请问大侠....是什么回事阿???急阿. .

------解决方案--------------------
看了半天也没有发现错误,用firebug 调试下吧。看看到底错在哪里了?
------解决方