I'm using handlebars to dynamically generate html pages for a NodeJS project. I have an event.js and a jquery.min.js file that are both loaded.
Here's part of the HTML :
<td>
<input id="temps_ajout_resultat" name="temps" type="text" value="{{tempsMini}}" pattern="[0-5][0-9]:[0-5][0-9]:[0-9][0-9]" title=" Format hh:mm:ss et au moins {{tempsMini}}">
</td>
<td>
<input id="tempsMini_ajout_resultat" class="hidden" name="tempsMini" type="text" value="{{tempsMini}}">
<input id="nbpoints" class="hidden" name="nbpoints" type="number" value="{{nbPointsSuivant}}">
<input id="num" class="hidden" name="num" type="number" value="{{gpnum}}">
</td>
<td><button id="valider_ajout_resultat" type="button" value="Ajouter">Valider</button></td>
And part of the Javascript :
$('body').on('click', '#valider_ajout_resultat', function() {
console.log('test');
console.log($('body').find('#tempsMini_ajout_resultat').val());
console.log($('body').find('#temps_ajout_resultat').val());
validerTempsCourse($('body').find('#tempsMini_ajout_resultat').val(), $('body').find('#temps_ajout_resultat').val());});
The problem is that clicking on the "valider_ajout_resultat" button does absolutely nothing. The console says nothing either.
Anyone sees the problem?
Thanks!