A
A
Alexander Arbuzov2013-04-26 13:12:02
JavaScript
Alexander Arbuzov, 2013-04-26 13:12:02

Doesn't handle success on $.ajax?

Subject. Already broke his head.

There is a code:

$.ajax({<br>
    url:'/udata://emarket/cart/.json',<br>
    type:'GET',<br>
               dataType: 'json',<br>
    success:function(data){<br>
      console.log(data)<br>
    }<br>
  });<br>

The response is json. He's coming, that's for sure. Status 200.
And success doesn't work.

The script is here - rstart.arbuzoff.su/ in main.js

Answer the question

In order to leave comments, you need to log in

2 answer(s)
H
himik, 2013-04-26
@arbuzzz

{
  "id": "dummy",
  "summary": {
    "amount": 0
  },

  "module": "emarket",
  "method": "cart"
}

/* This page generated in 0.016368 secs */
turn off the profiler

A
Alexander Kouznetsov, 2013-04-26
@unconnected

If I understand correctly, the script is triggered by pressing the buy button.
And it returns <?xml version="1.0" encoding="utf-8"?>
Why should dataType:'json' succeed?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question