PDA

View Full Version : Form Layout in firefox



goodlook
24 Dec 2009, 1:35 AM
It show a form panel with two textfield and two combobox. In IE it shows correctly.In IE is like as follow:
http://localhost:8080/griddemo/images/demo.JPG
in firefox none of the form element can been seen.Just a blue rectangle can been seen.
please help~~~~~


Ext.onReady(function(){
function grid_query(){
var v = qf.form.getValues();
var arr=[];
for(var p in v){
arr.push(p + ':' + v[p]);
}
alert(arr.join());
}

var qf=new Ext.form.FormPanel({
renderTo:'test_container',border:false,frame:true,labelAlign:'right',
width:700,
height:64,
keys:{key:Ext.EventObject.ENTER,fn:grid_query},
border:false,layout:'border',
items:[{
region:'center',width:480,
defaults:{layout:'form',labelWidth:90,defaults:{width:140}},layout:'table',layoutConfig:{columns:2},
items:[{
items:{name:'productName',fieldLabel:'ProductName',xtype:'textfield'}
},{

items:{
name:'publishTime',fieldLabel:'Publish',readOnly:true,xtype:'textfield',
listeners:{render:function(){
this.el.dom.onclick=function(){WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'});}}}}
},{

items:{
name:'categoryId1',fieldLabel:'Category1',xtype:'combo',name:'categoryId1',
hiddenName:'hiddenCategoryId1',triggerAction:'all',editable:false,valueField:'categoryId',
displayField:'categoryName',mode:'local',
store:new Ext.data.JsonStore({
fields:['categoryId','categoryName'],data:[{categoryId:'dddd',categoryName:'??1'},
{categoryId:'eeee',categoryName:'??2'},{categoryId:'ffff',categoryName:'??3'},
{categoryId:'aaaa',categoryName:'??4'}]}),
listeners:{select:function(c){
var cbo=Ext.getCmp('categoryId2');
cbo.clearValue();cbo.getStore().load({params:{my_test_parent_id:c.getValue()}});}}}
},{
items:{name:'categoryId2',id:'categoryId2',
fieldLabel:'Category2',xtype:'combo',name:'categoryId2',hiddenName:'hiddenCategoryId2',triggerAction:'all',
editable:false,valueField:'categoryId',displayField:'categoryName',mode:'local',
store:new Ext.data.JsonStore({fields:['categoryId','categoryName'],
url:'/griddemo/category/getall.do' (http://www.extjs.com/forum/'/griddemo/category/getall.do')})}
}]
},{
region:'east',
width:200,
layout:'vbox',
layoutConfig:{pack:'end'},
items:[{
border:false,
layout:'hbox',
height:32,
layoutConfig:{pack:'end',padding:'5',align:'middle'},
defaults:{width:60},
items:[{
xtype:'button',text:'query',width:60,handler:grid_query
},{
xtype:'button',text:'reset',width:60,handler:function(){qf.form.reset();}
}]
}]

}]
});
});