Answer the question
In order to leave comments, you need to log in
How to properly process JSON post type?
How to process such code (what content should be in calc.php)
$.ajax({
url: '/calc.php',
type: 'POST',
data: {
'type': type, // Значение type будет например 50
'control': control // Значение control будет например 20
},
dataType: "json",
success: function (json) {
prices=jQuery.parseJSON(json);
$('#prices').html(formatRight(prices));
},
});
Answer the question
In order to leave comments, you need to log in
the data you send to the calc.php file will be available in an array $_POST
under the keys type and control
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question