Skip to main content

Posts

Showing posts with the label extjs

ExtJS grab JSON result

I'm generating JSON response from PHP witch looks like this: { done:'1', options: [{ message:'Example message'},{message:'This is the 2nd example message'}]} I want to grab these results using ExtJS. This is what I have so far: Ext.Ajax.request({ loadMask: true, url: 'myfile.php', params: {id: "1"} }); What do I have to write next to get the json results like this: var mymessages = jsonData.options; And mymessages should contain Example message and This is the 2nd example message. Thank you. Source: Tips4all

Ext JS 4.0 providing "unconventional” data to charts

I have a store which always contains a single record. Lets say the record looks like this: {'good': 5, 'bad': 2, 'neutral': 3} How would I render that as a Pie chart ? Ext.js normally uses each record in a store as one point of the series. In my case, I have only one record and want it to be used as three points in the series.