Created
March 23, 2009 20:57
-
-
Save lsmith/83773 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
new YAHOO.util.XHRDataSource(url, { | |
responseType: YAHOO.util.DataSource.TYPE_JSON, | |
responseSchema: { | |
resultsList: 'Results', | |
fields: [ 'foo', 'bar', 'baz' ] | |
} | |
}).sendRequest(queryString, { | |
// handler that will execute when the XHR returns | |
success: function (req, res, payload) { | |
/* here's where you access the results from res.results */ | |
}, | |
// handler that will execute if the XHR fails | |
failure: function (req, res, payload) { | |
}, | |
// object that is returned into the success/failure handler | |
argument: /* if you need transaction specific stuff sent to your callbacks */ null | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment