Answer the question
In order to leave comments, you need to log in
How to deal with ajax + json?
Hi everyone... I've been freaking out about JSON and AJAX for 2 hours. I will say right away, I work with JS using instructions ...
The bottom line is, I call ajax on click and send a request - the request goes away, and silence in response ...
JS:
$.ajax({
url: '/module/goods/ajax/group_delete.php',
data: {delID: getParams},
contentType: "application/json; charset=utf-8",
dataType : "jsonp",
success: function (data) {
console.log(data);
}
});
[{"id":"1","name":"\u0420\u043e\u043b\u043b \u0424\u0438\u043b\u043a\u0430","group_id":"1","unit":"\u0433\u0440.","price":"259","photo":"","sostav":"\u0427\u0442\u043e \u0442\u043e \u0441 \u0447\u0435\u043c\u0442\u043e","onVK":"1","showSite":"1","showOMS":"1","changePrice":"1","watermark":"1","addtime":"","addadmin":""}]
Answer the question
In order to leave comments, you need to log in
1. You did not specify what type of request will be: get, post or another (I don’t know for sure if others can be used).
2.
It gives the answer:
[{"id":"1","name":"\u0420\u043e\u043b\u043b \u0424\u0438\u043b\u043a\u0430","group_id":"1","unit":"\u0433 \u0440.","price":"259","photo":"","sostav":"\u0427\u0442\u043e \u0442\u043e \u0441 \u0447\u0435\u043c\u0442\u043e"," onVK":"1","showSite":"1","showOMS":"1","changePrice":"1","watermark":"1","addtime":"","addadmin": ""}]
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question