2013-02-15 24 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>