2013-02-15 21 views
1

我的JSP代碼不會選擇日期,也不會顯示我的組合框的數據。我不是什麼問題。當我讓我的代碼在另一臺電腦上運行時,它工作正常。我使用的Eclipse朱諾下,Tomcat 7,jQuery和ExtJS的。請幫助..ExtJS datefield unclickable

My JSP code wont select the date and also it wont show the data of my combo box. I am using eclipse juno, tomcat 7, jquery and extjs.. Please help..

這是我對我的JSP代碼。

var genres = new Ext.data.SimpleStore({ 
     fields: ['id', 'genre'], 
     data : [['1','Comedy'],['2','Drama'],['3','Action']] 
    }); 



    var movie_form = new Ext.FormPanel({ 
     url: 'localhost:8080', 
     renderTo: document.body, 
     frame: true, 
     title: 'Movie Information Form', 
     width: 250, 
     items: [{ 
      xtype: 'textfield', 
      fieldLabel: 'Title', 
      name: 'title', 
      allowBlank: false 
     },{ 
      xtype: 'textfield', 
      fieldLabel: 'Director', 
      name: 'director', 
      vtype: 'name' 
     },{ 
      xtype: 'datefield', 
      fieldLabel: 'Released', 
      name: 'released', 
      disabledDays: [0] 
     },{ 
      xtype: 'radio', 
      fieldLabel: 'Filmed In', 
      name: 'filmed_in', 
      boxLabel: 'Color' 
     },{ 
      xtype: 'radio', 
      hideLabel: false, 
      labelSeparator: '', 
      name: 'filmed_in', 
      boxLabel: 'Black and White' 
     },{ 
      xtype: 'checkbox', 
      fieldLabel: 'Bad Movie', 
      name: 'badmovie' 
     },{ 
      xtype: 'combo', 
      name: 'genre', 
      fieldLabel: 'Genre', 
      mode: 'local', 
      store: genres, 
      displayField:'genre', 
      width: 120 

     }] 
+0

我首先想到的是:*高速緩存*。如果它在另一臺PC上運行。 – A1rPun 2013-02-15 11:18:14

回答

1

我的第一個猜測是,你使用的是IE的一些版本。由於它是本地主機,當Extjs正確或不正確地檢測到它時,您可能會獲得Intranet兼容性模式將您的IE版本降級爲其他內容。

<meta http-equiv="X-UA-Compatible" content="IE=edge" />標籤在你的頁面的頂部,迫使瀏覽器渲染同樣的方式,將某人在經常上網,並迫使無論是誰在看它使用的標準模式。

此外,還要確保你的頁面的頂部DOCTYPE標籤是:

<!doctype html>