2
ExtJS를 사용하여 간단한 편집 양식으로 창을 팝업하고 있지만 제출 버튼을 누르면 XHR 호출이 이루어지지 않고 콘솔에 this.form.el.dom is undefined
오류가보고됩니다.왜 내 ExtJS 양식이 제출되지 않습니까?
var myNameSpace = new function(){
var editForm, editWindow;
this.init = function(){
Ext.Ajax.request({
url: '/server/action.php',
success: function(result){
console.log('ajax is working ok'); // I get this
}
});
editForm = new Ext.form.FormPanel({
width:450,
autoHeight: true,
header : false,
items: [{
name: 'color',
fieldLabel: 'Color',
xtype: 'textfield',
value: 'blue'
}],
buttons: [{
text:"Submit",
scope: this, // tried without this, too
handler: function(){
// editForm.getForm().getValues() returns normal values
editForm.getForm().submit({
url: '/server/action.php',
success: function(form, action) {
console.log('Yes! Success!'); // I don't get this
},
failure: function(form, action) {
console.log('failed.'); // I don't get this
}
});
editWindow.close(); // works
console.log('the form is now closed'); // I get this
}
}]
});
editWindow = new Ext.Window(
{
title:'Enter your color',
autoWidth: true,
autoHeight: true,
layout: 'fit',
modal: true,
items: editForm,
closeAction: 'hide'
});
editWindow.show();
};
};
Ext.onReady(function() {
myNameSpace.init();
});
주제에 어떤 빛이 크게 감사하고 무릎을 꿇고 서라도 upvoted :
여기 내 코드입니다.
그게 전부 였어! 아주 좋은 통찰력. 고마워. –
당신은 환영합니다 :) – dbrin