i am new to extjs 4 and i am struck at when i am click button then ajax request get data from url and that ajax responce data will load in panel
below code is buttion code
xtype: 'button',
flex:1,
height: 30,
text : 'GEography',
handler:function() {
Ext.Ajax.request({
url: 'charts/states.php',
method: 'GET',
scripts:true,
success: function (response) {
Ext.get('ajaxpanel').dom.innerHTML = response.responseText;
}
});
}
},{
and below code is panel code
var ajaxForm = Ext.create('Ext.form.Panel', {
title: 'ajaxpanel',
id:'ajaxpanel',
frame: true,
bodyPadding: 5,
fieldDefaults: {
labelAlign: 'left',
msgTarget: 'side'
},
layout: {
type: 'vbox',
align: 'stretch'
},
items: []
});
so please help me in above problem
main aim is that’s url dat load in ajaxpanel
below answer for above question
for ajax loading