Posted By

peteinlux on 11/12/08


Tagged

textmate extjs


Versions (?)

Who likes this?

2 people have marked this snippet as a favorite

Anber
umang_nine


EXTJS - Simple ajax request with callback and json to object deserialization


 / Published in: Other
 

  1.  
  2. /**
  3. * Simple ajax request with callback and json to object deserialization
  4. */
  5.  
  6. simpleAjax = function () {
  7.  
  8. var received = function (response) {
  9. x = Ext.decode( response.responseText );
  10. //console.log(x);
  11. console.log(this);
  12. }
  13.  
  14. Ext.Ajax.request({
  15. url: '/files/ux/RemoteComponent/implementation4/grid_generated.php',
  16. success: received,
  17. failure: function () { console.log('failure');},
  18. headers: {
  19. 'my-header': 'foo'
  20. },
  21. params: { foo: 'bar' }
  22. });
  23.  
  24. } // eo function

Report this snippet  

You need to login to post a comment.