I'm having trouble executing javascript within the "echo" of PHP, I made some changes and the problem persists.
Here is 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>";