I'm trying to make an ajax request that sends a list of objects, but it seems that in this version of Jquery 1.8.2 (I can not update because the system is legacy and has many features using these versions), it seems that it does not recognize the
I do not know how to do this: $("#results :input").change(function () {
var type = $(this).attr("type")
var id = $(this).attr('name')
var obj = {}
if (type == 'text')
obj = { Unidades: listaGlobal, Id: id, Valor: $(this).val(), Type: type }
else if (type == 'checkbox')
obj = { Unidades: listaGlobal, Id: id, Selecionado: $(this).is(':checked'), Type: type }
// JQuery.ajaxSettings.traditional = true
$.ajax({
url: "/parametrizacao/SetaValor",
data: JSON.stringify(obj),
type: 'POST',
contentType: "application/json",
cache: false,
success: function (result) {
$('#results').html(result)
}
})
})