おそらくこれは非常に単純かもしれませんが、この ajax 呼び出しが機能しない理由がわかりません。機能するポストコールに相当するものを入れました。
//this works
$(document).ready(function () {
$('#ingresa_usuario_form').submit(function (event) {
event.preventDefault();
var url = $(this).attr('action');
var datos = $(this).serialize();
$.post(url, datos, function (resultado) {
$('#posted_values').html(resultado);
});
});
});
//this doesn't work
$(document).ready(function(){
$('#ingresa_usuario_form').submit(function (event) {
event.preventDefault();
$.ajax({
type: "POST",
url: $(this).attr('action'),
data: $(this).serialize(),
dataType: "text/plain",
success: function (response) {
$('#posted_values').html(response);
}
});
})
});