When i click to the button, it fire to ajax call and send button's id with request. Everthing works except my predefined button id does not come with request. It comes with value 'ext6-gen'. Do anyone know what i suppose to do for getting my predefined id.
//i defined a container with a textfield and button
var c2 = Ext.extend(Ext.Container, {
id : c2, initComponent : function() {
this.items = [ {
xtype : 'textfield', id : 'c3'}
, {
xtype : 'button', id : 'c4'} //it has id!!!
], c2.superclass.initComponent.call(this); }
}
);
Ext.onReady(function() {
var HttpReq = function(e, t) {
var elm = Ext.get(e.target);
Ext.Ajax.request( {
loadMask : true,
url : 'Default.sample',
params : {id : elm.id},
success : function(resp) {alert(resp.responseText); }
});
};
Ext.get('c4').on('click', HttpReq); //i assign click event to button
});