Hi Andrea,

My problem was exactly the same - response from the server didn't
contain a valid json.
Thanks a lot for your help!

On 14 December 2010 13:27, Andrea Dessì <[email protected]> wrote:
> Hi Maxim,
> I think onSuccess != onComplete,
> so if in the response there isn't a good nice valid JSON object
> the onSuccess event isn't fired.
> I had a stupid problem with a JSON response like this:
> {
>   a: "value",
>   b: "valueeee"
> }
> which is not valid.
> this valid:
> {
>   "a": "value",
>   "b": "valueeee"
> }
>
>
> --
> Andrea
>
> On Tue, Dec 14, 2010 at 12:17, Maxim Lacrima <[email protected]>
> wrote:
>>
>> Hi!
>>
>> I think I have very trivial problem Request.JSON, but I can't resolve it:
>>
>> var tariffVo = new Request.JSON({
>>    url: '/tariff',
>>    method: 'post',
>>    onSuccess: function() {
>>        alert('tariff received');
>>    },
>>    onRequest: function() {
>>        alert('request is being sent');
>>    }
>> });
>> tariffVo.send();
>>
>> For some reason onSuccess callback is never called, though I can see
>> that request was successful in firebug console:
>> POST http://localhost:8080/tariff 200 OK 37ms
>>
>> onRequest callback is always called.
>>
>> So what is wrong with my code?
>>
>> Thanks in advance.
>>
>> --
>> with regards,
>> Maxim
>
>



-- 
with regards,
Maxim

Reply via email to