Hello, I have a small question on how to do this:
$(function(){
$("input").keyup(function(){
var tipo = $(this).attr("name");
var text = $(this).val();
$.ajax({
url: "minhaurl",
data: {tipo: text},
type: "POST",
success: function(result){
$("#replaceResultSearch").html(result);
}
});
});
});
Notice that the "type" parameter comes from the "name" attribute of an input (The user has some inputs in a table, and depending on what he types in each input, he searches the database for that column of the table) But when I pass "type" into ajax, it treats this "type" as the name of the request, not the value it has (can it be "responsible / subject / data / etc") what can be done? Thank you