Permalink
Browse files

Merge branch 'master' of github.com:davidwhitney/JustGivingJavascript

  • Loading branch information...
DalSoft
DalSoft committed Sep 24, 2011
2 parents 37d1a07 + a9937bc commit a1a88498f2eb8cf47008a5533a836e22c064e32f
Showing with 10 additions and 5 deletions.
  1. +8 −3 JsHarness/Default.htm
  2. +2 −2 JsHarness/scripts/data/page.js
View
@@ -10,10 +10,15 @@
<a href="#" onclick="jg.init({apiKey: 'decbf1d2'});">fake link</a>
<script type="text/javascript">
- jg.init({ apiKey: 'decbf1d2', rootDomain: 'https://api.staging.justgiving.com' });
+ jg.init({
+ apiKey: 'decbf1d2',
+ rootDomain: 'https://api.staging.justgiving.com',
+ onResponse: function (data) {
+ alert(data);
+ }
+ });
- var response = jg.data.page().retrieve('pageShortName');
- alert(response);
+ jg.data.page().retrieve('pageShortName');
</script>
@@ -9,9 +9,9 @@
function pageMethods() {
- this.retrieve = function (pageShortName) {
+ this.retrieve = function (pageShortName, overrideCallback) {
var location = jg.utils().buildApiLocation("fundraising/" + pageShortName);
- var responseEnvelope = jg.http.get(location);
+ var responseEnvelope = jg.http.get({url: location, overrideCallback: overrideCallback});
return responseEnvelope;
};
}

0 comments on commit a1a8849

Please sign in to comment.