Hello, I have an input field named result. I want to call a function when something changes in this input. I tried this :
<input onchange="maFonction" id="result" readonly="readonly" type="text" value="0" size = "10" />
And tried to call this function
<?php
function maFonction()
{
$a = 40 ;
if ($result > $a) {
echo "trop dheure";
} elseif ($result == $a) {
?>
<input onclick="s(this.form);" type="button" value="sauvegarder" />
<?php
} else {
echo "moins de 40 heures a été effecuté";
}
}
?>
What mistake did I do or what am I missing?
onchange="maFonction()"using()for a function.