I think I'm being caught out by the SOP.

My app is a phonegap app and so it's domain is the client machine so
to speak.

When I try to talk to the server from the client Chrome enforces the
SOP. The status of the transport object is 0 in Chrome debugger.

I'm looking at jsonp solutions. My understanding is that you need
Rails to render

function myFunc () { return JSON }

ie you're just downloading a js file that contains your JSON.

Once downloaded the myFunc can be called and the JSON returned.

What's a simple way to manipulate the render json output in rails to
get jsonp.

Nigel


On Sep 16, 8:42 pm, "nigeke...@googlemail.com"
<nigeke...@googlemail.com> wrote:
> Still not working in Chrome. Still getting the same error.
>
> I tried with transport.responseJSON and transport.headerJSON.
>
> The only positive difference is that the rails webrick server now
> shows the request going to the correct controller and it executes the
> query. It was not doing this before.
>
> This is very annoying,
>
> I appreciate your help Richard.
>
> On Sep 16, 1:46 pm, Richard Quadling <rquadl...@gmail.com> wrote:
>
>
>
> > On 16 September 2010 11:21, nigeke...@googlemail.com
>
> > <nigeke...@googlemail.com> wrote:
> > > Content-Type: application/json;
>
> > That's the important bit.
>
> > So, now your JSON data will be in ...
>
> > transport.responseJSON
>
> > You don't need to evalJS() as JSON is JS.
>
> > --
> > Richard Quadling
> > Twitter : EE : Zend
> > @RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY

-- 
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.

Reply via email to