I'm new to js, this is what happens.
I have this function:
which is where I pick up the value of the drawer to know how many points there are to find
function puntos(npuntos) {
if (npuntos >= 2) {
document.getElementById("number_punt").style.display = 'none';
document.getElementById("cont_recoger_puntos").style.display = 'block';
}else{
alert("Ingrese por favor un valor valido!");
}
}
and I have this one:
I ask the number of points to which they want to find their respective distance and then the values of each point, but if I enter more than two 2 points, as for example 4, it does not let me give values to the points between 1 and 4 (to points 2 and 3) and I jump directly to the last point (in this case point 4) to enter their respective values. I do not know what I'm doing wrong, sorry for my ignorance on the subject.