I need to confirm submit button, with cancel or ok.
If ok, it submits the form and performs the predefined operations.
If you cancel, close the message and stay on the same page.
My java script code is only running the submit and the operation is not canceled.
Thanks for the help.
function envio() {
var r = confirm("Tem certeza que deseja excluir este registro?");
if (r == true) {
window.location = "edicao-demandas-result.lbsp";
form.submit();
}
}
<form method="post" name="form" action="file.html">
<div class="w3-row-padding">
<div class="w3-col w3-center w3-rest">
<label class="w3-text-blue w3-small">ATTENTION...
</label><br>
<input type="submit" class="w3-comp-btn w3-blue w3-round"
value="Delete Record" name=LBWEB_DELETERECORD onClick="envio();">
</div>
</div>
</form>