ajax call is silently failing

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

ajax call is silently failing

sebastianconcept
Hey guys,

can anyone explain why this isn't working?

JQuery ajax: #{
url: 'http://www.google.com/ig/calculator?hl=en&q=1BRL%3D%3FUSD'.
success: [:q| q inspect].
error: [Transcript cr; show: 'crap!'].
dataType: 'JSON'}

It doesn't inspect nor show the error in transcript.

Just a silent fail

ideas?

sebastian

PS: the #{} has that unusual syntax because I'm using the balaz alternative due to issue 217
https://github.com/NicolasPetton/amber/issues/217


Reply | Threaded
Open this post in threaded view
|

Re: ajax call is silently failing

Nicolas Petton
Sebastian Sastre <[hidden email]> writes:

Hi!

I don't think this is related to Amber.

curl showed me this:

HTTP/1.1 200 OK
X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block

And I get this error message in the browser:
"Origin http://amber-lang.net is not allowed by Access-Control-Allow-Origin"

:/

Nico

> Hey guys,
>
>
> can anyone explain why this isn't working?
>
> JQuery ajax: #{
> url: 'http://www.google.com/ig/calculator?hl=en&q=1BRL%3D%3FUSD'.
> success: [:q| q inspect].
> error: [Transcript cr; show: 'crap!'].
> dataType: 'JSON'}
>
> It doesn't inspect nor show the error in transcript.
>
> Just a silent fail
>
> ideas?
>
> sebastian
>
> PS: the #{} has that unusual syntax because I'm using the balaz
> alternative due to issue 217
> https://github.com/NicolasPetton/amber/issues/217
>
>

--
Nicolas Petton
http://nicolas-petton.fr