0
I have an html code and I would like to put in the tag that is inside the onclick event of a button, the address that it should go to after clicking on "YES", but I think I’m missing the quotation marks. Instead of him creating the button with the correct notification, this is what is happening with the button.
How to fix redirect to this onclick? Follow html code below.
<button class="btn btn-danger btn" id="excluir" onclick="return toastr.warning('Deseja realmente excluir o produto <?= $value['nome_ProdutosEmpresa'];?>?<br><br><a href="<?= base_url('produtos/atualizar/' . $value['id']) ;?>">SIM</a>')">
<i class="icon-times" style="width: 12px; text-align: center"></i>
</button>
Crossbow question: why put all this right on
onclick
of the element instead of defining a function in the JS and just running it in the click?– Woss
Thanks for the help... if I’m asking this way is because I want to understand what I’m missing, I know I can use the way you said, but my question was not that, hugs
– Felipe Augusto