3
I have the Jquery Script below that searches a Material and returns a Json list of that materials, I need to put this data in a table and put a field for the user to enter the amount of these materials, even putting in the Script so that the textbox gets the size 2 it remains in normal size. Does anyone know how to do that?
<script type="text/javascript">
$('#pesquisar').click(function () {
$.ajax({
url: "/RCM/ListarMateriais",
type: "POST",
data: { nome: $('#NomeMaterial').val() },
datatype: 'json',
success: function (data) {
$.each(data, function (I, item) {
$('#tbl').append("<tr><td>" + item.Nome + "</td><td>" + item.TD + "</td><td>" + item.Unidade +
"</td><td> <input type=\"text\" name=\"qtd\" size=\"2\" /> <input id=\"btAdd\" type=\"button\" value=\"Adicionar\" /> </td>")
})
}
});
});
</script>
So it worked, thank you very much Gypsy, helping me once again.
– Alan Almeida