2
I have a div
that has its contents loaded after loading the rest of the page. It is called by a button via AJAX. I have another button inside that content that would call a Javascript function to confirm page targeting. But when it is inside the contents pressed the button does not work.
Follow the function code.
<script language="Javascript">
function confirmacao(aluno) {
var resposta = confirm("Deseja remover esse aluno?");
if (resposta == true) {
window.location.href = "del_aluno_done.php?aluno="+aluno;
}
}
</script>
Follow the button code
<a href='javascript:func()'onclick='confirmacao('$aluno;)'>
I would start by arranging the link (button). Since it will confirm, call function func() from within function confirmation, if necessary.
– carlosrafaelgn
You got this thing to work?
– Sergio
Hello... Dude, did you make it work? I understood your problem, and I’m going through it. I need to make a call from a button, after being pressed via ajax.
– Artur