Search code examples
htmljsonpostextjs

How to post json data with extJS


I'm a bit of a newb with both extJS and json. What is the most painless route to POSTing json data using extJS? I'm not really interested any GUI features, just using the framework to send some sample data.


Solution

  • Ext.Ajax.request({
       url: 'foo.php',    // where you wanna post
       success: passFn,   // function called on success
       failure: failFn,
       params: { foo: 'bar' }  // your json data
    });