2012-01-13 13 views
1

Ext jsコンボがIE7で動作していません。私はバーチャルコンボ(Google検索のような)とテキストボックスのようなこのコンボの行為が必要です。それはIE7ExtjコンボがIE7で動作しない

にIE9とFFで働いていないが、これは私のコードです:

SearchIncidentForm=new Ext.FormPanel ({ 

     border:false, 
     renderTo:'searchIncidentDiv', 
     id: 'searchIncidentForm',  
     items : [{ 
      xtype:'panel', 
      id :'panelsearchIncident', 
      layout:'column', 
      defaults:{ 
        columnWidth:0.50, 
       labelAlign : 'top', 
       layout:'form', 
       border:false, 
       bodyStyle:'margin-top:5px; ' 
      }, 
      border:false, 
      items : [{  
       defaults:{anchor:'100%'}, 
        items:[{ 
         id : "incidentId", 
         fieldLabel : 'Incident Id', 
         labelStyle: 'color: #6C6C6C;width:85px;padding-top:7px;height: 22px;', 
         xtype : 'combo', 
         store:incidentStores, 
         //style: 'width:85px;height: 18px;', 
         width:100, 
         allowBlank : false, 
         labelAlign: 'top', 
         displayField : 'incidentId', 
         valueField : 'incidentId', 
         selectOnFocus : true, 
         typeAhead : false, 
         mode : 'remote', 
         triggerAction : 'all', 
         editable: true, 
         msgTarget:'qtip', 
         listAlign : 'tl-bl?', 
         //anchor : '80%', 
         minChars : 1, 
         hideTrigger:true, 
         hiddenName: 'incidentId', 
         listWidth:100, 
         listHeight:50, 

         submittValue:true, 
         listeners : { 
          specialkey : function(field, e){ 
           var key=e.getKey(); 
           if (key==e.ENTER) { 
            incidentSearchButtonHandler(); 
           } 
          }, 

          beforequery : function(){ 
          var val=Ext.getCmp('incidentId').getValue(); 
           if(isNaN(this.getEl().dom.value)){ 
            Ext.Msg.alert("","Please type numeric value"); 
           } 
           else{ 
            Ext.getCmp('incidentId').getStore().proxy.setUrl('getIncidentId.html?&query='+this.getEl().dom.value); 

           } 
          } 
         } 

        }] 
       },{ 

        items:[{ 
         xtype : 'button', 
         text : 'Search', 
         style: 'margin-top:19px;margin-left:20px;width:50px;',     
         width: 35, 
         height:15, 
         handler : incidentSearchButtonHandler 
        }] 
       }] 
     }] 
    }); 
} 

が、それはIEで働いていません。検索ボタンを押すと、please type Idというアラートが表示されます。つまり、入力された値は使用されません。助けてください。

+0

あなたはより多くのコードを共有する必要があるとしています。どのような状況でアラートがポップアップしますか?送信ボタンはどこですか?正確に何が起こるはずですか? –

+0

が終了 – sissonb

+0

@Adam Rackisでアレイ内の余分なコンマがあることがisbeforequeryコードが存在する余分なコマない:関数(){ \t \t \t \t \t \t \tするvarヴァル= Ext.getCmp( 'incidentId ').getValue(); \t \t \t \t \t \t \t \t IF(ますisNaN(this.getEl()。dom.value)){ \t \t \t \t \t \t \t \t \t Ext.Msg.alert( ""、 "" 数値を入力してください);他 \t \t \t \t \t \t \t \t} \t \t \t \t \t \t \t \t { \t \t \t \t \t \t \t \t \t Ext.getCmp( 'incidentId')。getStore()。proxy.setUrl( 'getIncidentId .html?&query = '+ this.getEl()。dom.value); \t \t \t \t \t \t \t \t \t \t \t \t \t \t \t \t \t} \t \t \t \t \t \t \t} –

答えて

2

私はIEと前にこのにかましてきた:あなたは、配列の最後の要素の後に余分なコンマがあります

items:[{ 

    submittValue:true, 
    listeners : { 
     specialkey : function(field, e){ 
      var key=e.getKey(); 
     if (key==e.ENTER) { 
      incidentSearchButtonHandler(); 
     } 
    }, // <------ Extra comma. Delete it. 
]} 
+0

まだそこにこの問題が追加されます... plsはそれが余分ではない –

+0

を助けますコンマ –

関連する問題