0
I have the following variable:
var id = doc.data().cd_id ;
Already in Javascript I dynamically mount html:
"<button type='button' onclick='testeonclick(" + id + ")' class='btn btn-primary col-xs-12'>Editar Produto </button>"
My Function:
function testeonclick(id){
alert(id);
}
The following error occurs:
Uncaught SyntaxError: Invalid or unexpected token
My id has the following value: 4eCj7NkX9liruvf8izgF
Just with the information that this here is not possible to tell where this error.
– NoobSaibot