Ext JS Panel Content – fetch HTML via Ajax

How to fetch Ext JS Panel’s content HTML from Server using Ajax?

Sometimes, you may want to populate an Ext-JS Panel with HTML content generated at server side (using JSP, PHP or any other server side view technology). This enables you to use existing server side views and embed them in Ext-js Panels or other components. You can do that using Ajax as shown in code snippet below.

  url: 'company/create',
  success: function(response){
	var htmlText= response.responseText;
	//Get the Panel component using its id
	var companyPanel = Ext.getCmp('companyPanel');
	// update the panel content's with 
        // HTML response from Ajax call
	companyPanel.update(htmlText, true);
This entry was posted in Ext-JS Sench Touch and tagged , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *