Inside PHP has an IF that should execute a JS function.
Thus:
if ($x == $y) {
// como executar a função nada() dentro deste if?
}
?>
<script>
function nada() {
alert("nada de mais");
}
</script>
In short, according to a value obtained from the database, the JS function is executed or not. Why does not this work?
I imagine it might have something to do with Ajax / JSON. Is that it?