PDA

View Full Version : Window problem



jacksv123
23 Apr 2010, 9:09 PM
function DoubleClickDialog(title){
var dialog= new Ext.Window({
applyTo:'win',
width:400,
height:430,
title:title,
minWidth:350,
minHeight:300,
buttonAlign:'right',
layout:'anchor',
items:[{
region: 'center',
header:false,
//title: 'Book Details',
//id: 'details-panel',
autoScroll: true,
collapsible: true,
split: true,
margins: '0 1 1 1',
cmargins: '1 1 1 1',
height: 250
//html: detailsText
}],
buttons: [{
text: '??'
},{
text: '??',
listeners:{
'click':function close(){
//alert(dialog.findById('he').getValue());
dialog.close();
}
}
}]

});
dialog.show();
}


when the window is been created,it throw uncaught typeError: Cannot call method 'apply' of undefined,can someone help me,thank you !

Animal
23 Apr 2010, 11:16 PM
Where did you copy-paste that code from?

mpawlowski
24 Apr 2010, 7:30 AM
If you take out applyTo: 'win', then the window pops up just fine.

Edit: and next time, use [CODE] tags around the code makes it easier to read

jacksv123
26 Apr 2010, 8:46 PM
has problem?