I'm not sure that it's a jQuery problem -- using Firebug, I can see
that a get request is being sent out with the following headers:
Host:
api.globalgiving.org
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:
1.9.1.9) Gecko/20100315 Firefox/3.5.9
Accept: application/xml, text/xml, */*
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
Referer:
http://damp.cs.dartmouth.edu/csfam/donations.html
Origin:
http://damp.cs.dartmouth.edu
and I receive a response with these headers:
Date: Sat, 08 May 2010 18:24:31 GMT
Server: Apache-Coyote/1.1
Cache-Control: max-age=43200
Content-Type: application/xml;charset=UTF-8
P3P: CP="CAO PSA OUR"
Vary: Accept-Encoding
Content-Encoding: gzip
Keep-Alive: timeout=15
Connection: Keep-Alive
Transfer-Encoding: chunked
Set-Cookie: Coyote-2-44b1e587=a010065:0; path=/
but there is no actual data in the response.
I added a success and error response functions, and they indicate that
the data in the response is null.
Thanks a lot for your help!
- Ray
On May 6, 11:42 pm, Kevin Conroy <
kevincon...@gmail.com> wrote:
> Thanks Mark!
>
> Yes, it looks like a JQuery problem. I'd recommend checking out the
> documentation for the ajax call:
>
>
http://api.jquery.com/jQuery.ajax/
>
> You need to set up a success function for JQuery to call when it returns
> with the result. You may also have better success with JQuery.get. There are
> a number of wonderful tutorials online. Here's one that a quick Google
> search found:
>
>
http://net.tutsplus.com/tutorials/javascript-ajax/5-ways-to-make-ajax...
>
> Hope this helps. If not, please write back and post more of your code so we
> can try to help.
>
> Cheers,
> Kevin
>
> Kevin Conroy
> E-mail:
kevincon...@gmail.com
>
> On Thu, May 6, 2010 at 11:16 PM, Mark Silverberg <
m...@marksilver.net>wrote:
>
>
>
> > Hi there,
>
> > Doing a simple curl (from the command line of any unix or mac) shows that
> > the URL you are trying to HTTP GET is valid - so the problem definitely lies
> > in your jQuery fun which I'm personally not well-mannered in. Now that we
> > know it's a jQuery issue, perhaps you should ask for general help from that
> > community..
>
> >
m...@marksilver.net
>
> > On May 6, 2010, at 9:31 PM, rayd wrote:
>
> > > I'm trying to use XMLHttpRequests to grab data the GlobalGiving API
> > > but I can't seem to get it working.
> > > Here's what I'm doing just for a test, but I'm not getting anything
> > > back. In fact, when I'm using the Chrome dev tools, I don't even see a
> > > response to my request.
>
> > > jQuery.ajax({url:"
https://api.globalgiving.org/api/public/
> > > projectservice/all/projects?
> > > api_key=e10c5e8e-730f-41c0-9b07-0983c94160a4",
> > > dataType: 'xml', cache: false, type: 'GET'});
>
> > > Can anyone shed some light on this?
>
> > > Thanks a lot!
>
> > > - Ray
>
> > > --
> > > You received this message because you are subscribed to the Google Groups
> > "GlobalGiving API" group.
> > > To post to this group, send email to
globalgi...@googlegroups.com.
> > > To unsubscribe from this group, send email to
> >
globalgiving-a...@googlegroups.com<
globalgiving-api%2Bunsu...@googlegroups.com>
> > .
> >
globalgiving-a...@googlegroups.com<
globalgiving-api%2Bunsu...@googlegroups.com>
> > .
> For more options, visit this group athttp://
groups.google.com/group/globalgiving-api?hl=en.