0
I have an onclick confirm in my code that, if ok, it sends a variable to a specific page. If Cancel... it should cancel the operation.
But even if you click on Cello, it is sending the variable to the page.
Follows the code:
<a onclick="confirm('mensagem de confirmação')" href= "close.php?id_os=<?php echo $temp['id']?>";>
<div style="width:5%; height:100%">enviar
</div>
</a>
Obs: PHP entered is ok. In fact, as stated earlier, on any button I click (ok or Cancel), it sends the variable to the page in question.
Place a Return before confirm: Return confirm('confirmation message')
– Diego Vieira