extjs4.2 - how to replace content of div with new ajax result in ExtJs? -
I'm new to exegesis, I want to overwrite html content of div id "infraTab" New Ajax Request Results
Help will be greatly appreciated Thanks in advance. Below is the code that I'm doing so far.
Ext.define ('testview', {layout: {type: 'border', padding: 5}, expand: 'Ext.Panel', aka: 'widget.infraTab', ID: 'Infratab', Margin: '10 10 10 10 ', Limit: Right, Item: Extensions. (' Extensions.ViewView ', {store: store, tpl: Result Content, Item Selector:' div.list-item ', Listeners: {itemclick: function (see, record, item, index, e, eOpts) {getublevels ("abc");}}})}); The above code is displaying the data, and the new AJAX call function is
var getsublevels = function (value) {var sublvlStore = Ext.create ( 'Ext.data.Store', {model: 'LevelModel', autoload: true, proxy: {type: 'ajax', url: 'url', method: 'GET', additional parameters: {test: test}, reader : {Type: 'Jason', origin: 'data', total property: 'total', success property: 'success'}}}); SublvlStore.load (); Ext.define ('testview', {layout: {type: 'border', padding: 5}, expand: 'ext. Pinal', nickname: 'widget.infraTab', id: 'infra-tab', margin: '10 10 10 10, range: true, render: "InfraTab", item: extension. ('Extension.ViewView', {store: sublvlstore, tpl: result-wise, item selector: 'div.list-item', listeners: { Itemclick: Function (see, record, item, index, e, eOpts) {getublevels (record.get ('value'));}}})}); }; I tried to to render but no luck.
You do not need to change the entire contents of the page for it, to see the list type that your The data in the nearby store is bound to allow you to update / change / reload or change the data in the store and the results will be displayed on the screen.
Try something like this in your top code block
items: Ext.create ('Ext.view.View', {store: store, tpl: resultTemplate, itemSelector: 'Div.list-item', listeners: {itemclick: function (see, record, item, index, e, eOpts) {store.reload ({params: {parentValue: record.get ('value')}, url: '/new_url.php'})}}}} In the above example, when you click on an item in the list, it will send an AJAX request back to the server The criteria list will contain parameters of the value of the item for which your backend service Should be stopped again with separate data from the first request.
Comments
Post a Comment