[google-appengine] Re: A Very Specific AJAX RPC App Engine Question

2008-09-22 Thread Downtown
Thank you . I have everything working. I appreciate your feedback. On Sep 12, 3:16 pm, Adam Fisk <[EMAIL PROTECTED]> wrote: > Couple of quick points here: > > 1) In your example (Downtown), you don't need to use eval.  When you > specify "handleAs: 'json'" the response is already JSON (already

[google-appengine] Re: A Very Specific AJAX RPC App Engine Question

2008-09-12 Thread Adam Fisk
Couple of quick points here: 1) In your example (Downtown), you don't need to use eval. When you specify "handleAs: 'json'" the response is already JSON (already evaled underneath). You don't need to worry about YUI and all, although the commented format suggested above is ideal. 2) In respons

[google-appengine] Re: A Very Specific AJAX RPC App Engine Question

2008-09-12 Thread Bill
You might want to use Crockford's JSON utility instead of the naked eval of the response. See the section "A word of caution against using eval" on the YUI JSON page: http://developer.yahoo.com/yui/json/ The original non-YUI version can be used as well: http://json.org/json2.js On Sep 12, 6:36 a

[google-appengine] Re: A Very Specific AJAX RPC App Engine Question

2008-09-12 Thread Ovnicraft
is posible use pastbin? 2008/9/12 Downtown <[EMAIL PROTECTED]> > > Thanks for all the posts. I have GET working very well. I had one > additional issue converting string to JSON object which was solved as > follows: > > dojo.xhrGet({ >u

[google-appengine] Re: A Very Specific AJAX RPC App Engine Question

2008-09-12 Thread Downtown
Thanks for all the posts. I have GET working very well. I had one additional issue converting string to JSON object which was solved as follows: dojo.xhrGet({ url: myurl, handleAs: "json",

[google-appengine] Re: A Very Specific AJAX RPC App Engine Question

2008-09-09 Thread Peter Svensson
That's a good example of how jsonp can look like. Also, I wrote the last post with my head screwed on backwards, I think :) To get jsonp, you can just use response.out.write('/*'+foo+'*/') where foo is the json string. Cheers, PS On Tue, Sep 9, 2008 at 10:18 PM, Davide Rognoni <[EMAIL PROTECTED]

[google-appengine] Re: A Very Specific AJAX RPC App Engine Question

2008-09-09 Thread Davide Rognoni
JSON-P example: function foo(json) { alert( json["responseData"]["translatedText"] ); } http://ajax.googleapis.com/ajax/services/language/ translate?v=1.0&q=hello%20world&langpair=en%7Cit&callback=foo"> // - see the link http://ajax.googleapis.com/

[google-appengine] Re: A Very Specific AJAX RPC App Engine Question

2008-09-09 Thread Peter Svensson
I didn't know that GAE / Django supported callbacks, but they're really not needed, since you supply your own handler function in Dojo ('load'). If the json object is properly formatted, it will be returned as text and evaluated by Dojo (since you're using handleAs:'json'). So add a load function,

[google-appengine] Re: A Very Specific AJAX RPC App Engine Question

2008-09-08 Thread Bill
I've been building some AJAX clients that call App Engine backends. I'm not sure what documentation your citing, but App Engine is just like any server out there. The standard webapp framework nicely handles GET, POST, and other HTTP actions/verbs. You can set the content header in your handler