2009-07-30 40 views
0

這段代碼運行的是firefox,但是錯誤就是爲什麼?請幫幫我。Extjs的Internet Explorer對象沒有找到問題

xxx.js代碼:

var gridFormf = new Ext.FormPanel({ 
     id: 'company-form', 
     frame: true, 
     labelAlign: 'left', 
     title: 'İş Emri', 
     bodyStyle:'padding:5px', 
     width: 1, 
     tbar: [ 
      newIsEmri,delIsEmri,edIsEmri,rapIsEmri,serIsEmri 
     ], 
     layout: 'column', // Specifies that the items will now be arranged in columns 
     items: [ 
     { 
      columnWidth: 0.3, 
      layout: 'fit', 
      items: [{ 
        columnWidth: 1, 
        xtype: 'fieldset', 
        labelWidth: 90, 
        title:'Ekip/Servis', 
        defaults: {width: 120, border:false}, // Default config options for child items 
        defaultType: 'textfield', 
        autoHeight: true, 
        bodyStyle: Ext.isIE ? 'padding:0 0 5px 15px;' : 'padding:10px 15px;', 
        border: true, 
        style: { 
         "margin-left": "10px", // when you add custom margin in IE 6... 
         "margin-right": Ext.isIE6 ? (Ext.isStrict ? "-10px" : "-13px") : "0" // you have to adjust for it somewhere else 
        }, 
        items: [{ 
         fieldLabel: 'Ekip/Personel', 
         name: 'SERVIS_VEREN' 
        }] 
       },{ 
        columnWidth: 1, 
        xtype: 'fieldset', 
        labelWidth: 90, 
        title:'Ürün', 
        defaults: {width: 120, border:false}, // Default config options for child items 
        defaultType: 'textfield', 
        autoHeight: true, 
        bodyStyle: Ext.isIE ? 'padding:0 0 5px 15px;' : 'padding:10px 15px;', 
        border: true, 
        style: { 
         "margin-left": "10px", // when you add custom margin in IE 6... 
         "margin-right": Ext.isIE6 ? (Ext.isStrict ? "-10px" : "-13px") : "0" // you have to adjust for it somewhere else 
        }, 
        items: [{ 
         fieldLabel: 'Cihaz', 
         name: 'URUN_CIHAZ_ADI' 
        }, 
        { 
         fieldLabel: 'Marka', 
         name: 'URUN_MARKA_ADI' 
        }, 
        { 
         fieldLabel: 'Model', 
         name: 'URUN_MODEL_ADI' 
        },{ 
         fieldLabel: 'Seri No', 
         name: 'URUN_SERI_NO' 
        } 
        ] 
       }] 
     },{ 
      columnWidth: 0.3, 
      layout: 'fit', 
      items: [{ 
       columnWidth: 1, 
       xtype: 'fieldset', 
       labelWidth: 90, 
       title: 'Serviş Geliş Türü', 
       defaults: { 
        width: 140, 
        border: false 
       }, // Default config options for child items 
       defaultType: 'textfield', 
       autoHeight: true, 
       bodyStyle: Ext.isIE ? 'padding:0 0 5px 15px;' : 'padding:10px 15px;', 
       border: true, 
       style: { 
        "margin-left": "10px", // when you add custom margin in IE 6... 
        "margin-right": Ext.isIE6 ? (Ext.isStrict ? "-10px" : "-13px") : "0" // you have to adjust for it somewhere else 
       }, 
       items: [{ 
        fieldLabel: 'Geliş Türü', 
        name: 'SERVIS_GELIS_TURU' 
       }] 
      },RadioPanels 


      ] 
     },{ 
      columnWidth: 0.3, 
      layout: 'fit', 
      items: [{ 
       columnWidth:1, 
       autoHeight: true, 
       border: true, 

       items: [gridAksesuar] 
      },gridAriza,{ 
       columnWidth: 1, 
       xtype: 'textarea', 
       labelWidth: 0, 
       width:250, 
       defaultType: 'textarea', 
       autoHeight: true, 
       border: false, 
       name:'ARIZA_ACIKLAMASI' 

      }] 
     },{ 
      columnWidth: 1.0, 
      layout: 'fit', 
      items: gridFormx 
     }] 
    }); 

我的html代碼:

<script src="/ApplicationJs/xxx.js" type="text/javascript"></script> 
<script type="text/javascript"> 

Ext.onReady(function() { 


    var viewport = new Ext.Viewport({ 
     layout:'fit', 
     items: [gridFormf] 
    }); 
</script> 

Internet Explorer的迴歸錯誤。錯誤描述是找不到對象gridFormf。

+0

我所能建議的是一次刪除位,直到它在IE中重新開始工作。 – scunliffe 2009-07-30 14:43:12

回答

2

請檢查您的代碼是否有其他逗號(,)。無論是在配置對象中,還是可能在您的JSON返回數據存儲。 FF會渲染,但IE會中斷。

通過JSLint的運行你的JS代碼,然後再通過驗證

1

運行JSON這可能是與ExtJS的一個bug。 嘗試Sencha.com的示例ViewPort [RSS Feed]應用程序,您會注意到Internet Explorer中左側的摺疊失敗。