PDA

View Full Version : oh



shuang
24 Apr 2008, 7:05 PM
i'm had let promblem


Ext.onReady(function(){
var p = new Ext.Panel({
title: 'My Panel',
collapsible:true,
renderTo: 'container',
width:200,
items:[{
xtype:"datefield",
fieldLabel:"Date",
name:"datevalue"
}]
});
document.getElementById('new').width = 400; // <------ don't could changed 'width'

});

what used it syntax?
who help me

very thank

rudytheng
24 Apr 2008, 7:08 PM
try this....

Ext.getCmp('new')

evant
24 Apr 2008, 7:08 PM
Ext.onReady(function(){
var p = new Ext.Panel({
title: 'My Panel',
collapsible:true,
renderTo: 'container',
width:200,
id: 'new', //why would you assign the id any different?
items:[{
xtype:"datefield",
fieldLabel:"Date",
name:"datevalue"
}]
});
p.setWidth(400); // <------ don't could changed 'width'

});

shuang
24 Apr 2008, 7:18 PM
now ,i'm delete line 'id'

when add that line ,panel could't show . i don't know

thank for helper

evant
24 Apr 2008, 7:31 PM
Works fine for me:



Ext.onReady(function(){
var p = new Ext.Panel({
title: 'My Panel',
collapsible:true,
renderTo: 'container',
width:200,
items:[{
xtype:"datefield",
fieldLabel:"Date",
name:"datevalue"
}]
});
p.setWidth(400);

});

shuang
24 Apr 2008, 7:41 PM
oh!! my god

i'm very thank you

but, really i'm need change 'html' inside panel

i'm thought it's syntax same all

i'm sorry

can u help change 'html'?


Ext.onReady(function(){
var p = new Ext.Panel({
title: 'My Panel',
collapsible:true,
renderTo: 'container',
width:400,
id: 'zz',
items:[{
xtype:"datefield",
fieldLabel:"Date",
name:"datevalue"
}],

html: Ext.example.bogusMarkup //<------- i need syntax for change html
});

p.setWidth(100);

});

respect u