PDA

View Full Version : about dynamic button and form legend line



jamespan
17 Apr 2007, 1:07 AM
hi all
i have two question about this thread:
1. i create one button,but it display two button,why?
2. i don't want to display the legend line,please tell me how to clear it away

thank you

here is the code


Ext.onReady(function(){
var catClsReader = new Ext.data.JsonReader({},['id','name']);
var catClsStore = new Ext.data.Store({
proxy:new Ext.data.HttpProxy({
url:'test.do?init=1'
}),
reader:catClsReader,
remoteSort:false
});
Ext.QuickTips.init();

var querySubmit = function(){
alert("test dynamic button ok");
}

var simForm = new Ext.form.Form({
labelWidth: 75
});

simForm.column({width:200,style:'margin-left:10px;'});
simForm.fieldset(
{
hideLabels:true
},
new Ext.form.ComboBox({
name:"catalogCls",
store: catClsStore,
value: 'select',
displayField : 'name',
valueField: 'id',
triggerAction:'all',
typeAhead: true,
forceSelection:true,
loadingText:'please wait......'
}),
new Ext.form.TextField({
name:"fullText",
allowBlank:false,
value:'keyword'
})
);
simForm.container({width:200});
simForm.column({width:100,hideLabels:true,style:'margin-left:6;'},
new Ext.form.Checkbox({
name: 'useHomephone',
boxLabel:'homephone'
})
);
simForm.column({width:80,style:'margin-left:6;'},
new Ext.Button("btn", {
text: 'Go',
onClick:querySubmit
})
);
simForm.end(); //close container
simForm.end(); //close column

simForm.applyIfToFields({
width:160
});

simForm.render("form_ct");
});