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