0
I am trying to get a ticket filled automatically when selecting a row from a table. In this case, there are textbox (or text inputs) that must be filled with some values. My function is
function verBoleto(nossonumero,valor,dataemissao,datavencimento,razaosocial){
var d = new Date();
d.setDate(d.getDate());
$('#dataProc1').datepicker({
dateFormat: "dd/mm/yy",
});
// Data de processamento é a data atual.
$("#dataProc1").datepicker('setDate',d);
$("#dataProc2").val($("#dataProc1").val());
$('#nossoNum1').val(nossonumero);
$('#valDoc1').val(valor).replace('.',',');
$('#dataDoc1').val(dataemissao);
$('#vencDoc1').val(datavencimento);
$('#sacado1').val(razaosocial);
}
But for now without much result. The field nossonumero is filled without problems. The value field is showing dot number before decimals or instead of comma. The issue and maturity dates are coming with comma number (01/06/2015 comes 0.00008271298593879239, for example). And the social reason doesn’t even appear filled in the Textbox.
What can you do in this case?
What gives
console.log(nossonumero,valor,dataemissao,datavencimento,razaosocial);
in the first line of this function?– Sergio
Where JS parameter values come from?
– PauloHDSousa
Sergio, how do I do this console.log? Paulo, The values of the parameters come from an SQL query and are displayed in a table.
– Gustavo Hoppe Levin
@Gustavohoppelevin opens the console by pressing F12 or right-clicking on the page by selecting "no need"
– Sergio
By debbuger, the onclick function is, for example: onclick="verBoleto(63271038641,687.75,30/05/2015,18/06/2015,TEST NAME)". I already got the value scheme to convert the semicolon, so only the dates and the social reason name are missing (he accuses being missing a ')' because the social reason is a full name with white spaces in the middle).
– Gustavo Hoppe Levin