4
I have a screen where the lines are loaded according to the data of the database and for this I have a PHP+jQuery and related to the creation of the same. What happens is that the array that sends the data comes correctly, but at load time the field is only fed by the first word, if there are spaces it ignores. Below follows:
Array:
[{"nome":"DIEGO LUIS VENUZKA","codigo":"5357","cracha":"6246286874","situacao":"ATIVO","ASO":"30\/04
\/18","id":"1","descricao":"PONTE ROLANTE (NR11 E NR12)","validade":"06\/05\/18"},{"nome":"DIEGO LUIS
VENUZKA","codigo":"5357","cracha":"6246286874","situacao":"ATIVO","ASO":"30\/04\/18","id":"4","descricao"
:"EMPILHADEIRA A GAS (NR11 E NR12)","validade":"06\/05\/18"}]
Part of the code that loads the data from this array:
for(var i = 0;i<data.length;i++){
HTML += "<tr><td><input type = 'text' size = '3' name = 'id[]' id = 'id[]' value=" + data[i].id + " readonly></td>";
HTML += "<td><input type = 'text' size = '40' name = 'descricao[]' id = 'descricao[]' value=" + data[i].descricao + " readonly></td>";
HTML += "<td><input type = 'text' size = '10' name = 'validade[]' id = 'validade[]' value=" + data[i].validade + " readonly></td>";
}
Upshot:
Any suggestions?
Cara..... I since 8 am breaking me and you give me a solution so obvious...that shame....hehehe. Thank you very much!!!!!
– Diego
It turns out, in the middle of so many single double quotes there was no missing any.
– NoobSaibot