0
I have the following function, which returns an entire value of an AJAX query to my SQL Server database.
function qtdItensUltimaCompra(){
var url = 'AjaxQtdProdutoInsumo.jsp';
var temp = document.getElementsByName("cdItemInsumo");
var cd_unidade = document.getElementsByName("cdUnidade");
var cdSetor = getElementsByName("cdSetor");
var param = "&cdInsumo=" + temp + "&cd_unidade=" + cd_unidade + "&cdSetor=" + cdSetor;
var qtdUltimaCompra = loadAjax(url,param);
this.setAttribute('qtdUltimaCompra', texto);
}
And here the TD that this value needs to appear, however I could not through the setAttribute
nor the document.qtdUltimaCompra.value(qtdUltimaCompra)
, any suggestions?
<td align="center" width="15%" class="font-padrao" id="tdQtdUltimaCompra">
<input type="hidden" name="qtdUltimaCompra" value="">