-1
I’m having trouble running javascript inside PHP "echo", I’ve made some changes and the problem persists.
Follow the code I’m using:
echo "<a href='excluir.php?id_edital=" . $pegar['id_edital'] . "; onClick='return confirm('Deseja realmente deletar o edital?')''><button id='submitdel'><img id='icon-trash' src='images/trash.png'> Excluir</button></a>";
href is not being closed! Oce opens the single quote but does not close it.
– Don't Panic
There’s no missing one
'
ending the value ofhref
? Just look at the generated HTML and check the syntax.– Woss
and
onClick='return confirm('
is incorrect, it is necessary to use scape:onClick='return confirm(\"..\"'
– BrTkCa