jo3bl4k
14 Jul 2007, 2:59 PM
I want insert HtmlEditor in a dialog but i have an error.
The code:
function Prova(dataC){
var creaform;
var dialog;
if(!dialog){
dialog = new Ext.BasicDialog("f-add", {
modal:true,
autoTabs:false,
autoCreate:true,
width:500,
height:300,
shadow:true,
minWidth:300,
minHeight:250,
proxyDrag: true,
title: 'Aggiungi Evento al calendario'
});
dialog.addKeyListener(27, dialog.hide, dialog);
dialog.addButton('Aggiungi', dialog.hide, dialog).disable();
dialog.addButton('Chiudi', dialog.hide, dialog);
dialog.body.setStyle('padding-left:3px');
var top = new Ext.form.Form({
labelAlign: 'top'
});
top.column(
{width:282}, // precise column sizes or percentages or straight CSS
new Ext.form.TextField({
fieldLabel: 'First Name',
name: 'first',
width:225
}),
new Ext.form.TextField({
fieldLabel: 'Company',
name: 'company',
width:225
})
);
top.column(
{width:272, style:'margin-left:10px', clear:true}, // apply custom css, clear:true means it is the last column
new Ext.form.TextField({
fieldLabel: 'Last Name',
name: 'last',
width:225
}),
new Ext.form.TextField({
fieldLabel: 'Email',
name: 'email',
vtype:'email',
width:225
})
);
top.container({},
new Ext.form.HtmlEditor({
id:'bio',
fieldLabel:'Biography',
width:550,
height:200
})
);
top.render(dialog.body);
}
dialog.show();
}
The code:
function Prova(dataC){
var creaform;
var dialog;
if(!dialog){
dialog = new Ext.BasicDialog("f-add", {
modal:true,
autoTabs:false,
autoCreate:true,
width:500,
height:300,
shadow:true,
minWidth:300,
minHeight:250,
proxyDrag: true,
title: 'Aggiungi Evento al calendario'
});
dialog.addKeyListener(27, dialog.hide, dialog);
dialog.addButton('Aggiungi', dialog.hide, dialog).disable();
dialog.addButton('Chiudi', dialog.hide, dialog);
dialog.body.setStyle('padding-left:3px');
var top = new Ext.form.Form({
labelAlign: 'top'
});
top.column(
{width:282}, // precise column sizes or percentages or straight CSS
new Ext.form.TextField({
fieldLabel: 'First Name',
name: 'first',
width:225
}),
new Ext.form.TextField({
fieldLabel: 'Company',
name: 'company',
width:225
})
);
top.column(
{width:272, style:'margin-left:10px', clear:true}, // apply custom css, clear:true means it is the last column
new Ext.form.TextField({
fieldLabel: 'Last Name',
name: 'last',
width:225
}),
new Ext.form.TextField({
fieldLabel: 'Email',
name: 'email',
vtype:'email',
width:225
})
);
top.container({},
new Ext.form.HtmlEditor({
id:'bio',
fieldLabel:'Biography',
width:550,
height:200
})
);
top.render(dialog.body);
}
dialog.show();
}