Oct 15, 2010, 11:28 AM
[0.8] How update a FormPanel into a Window in Javascript ????
Hello,
I would like update a formpanel content that is into a window.
But my problem, I didn't manage to get the FormPanel object to add TextField ...
My code :
My js function BuildEcheancier :
Thks
I would like update a formpanel content that is into a window.
But my problem, I didn't manage to get the FormPanel object to add TextField ...
My code :
<ext:Window ID="win" runat="server" >
<Body >
<ext:FormPanel LabelWidth="75" ID="fpEcheancier" runat="server">
<Body>
</Body>
</ext:FormPanel>
</Body>
<Listeners>
<Render Fn="BuildEcheancier" />
</Listeners>
</ext:Window>
My js function BuildEcheancier :
var BuildEcheancier = function (){
var win = <%= win.ClientID %>;
for(i = 0; i < 10; i++)
{
var textfield = new Ext.form.TextField();
textfield.id = 'l_' + i;
textfield.fieldLabel = 'test';
win.items[0].items.add(textfield);
}
}
Any ideas ?Thks