Well, I do not know if I made myself understood correctly, so I explain. I am working with what is HTML, JS, PHP and MySQL. At the moment my only problem would be with JS. I'm trying to use an if, to compare 2 numbers, one has to be yes or if less than the other, otherwise it jumps an error message. (An alert in this case [Quantity not valid, you are trying to carry more than the existing amount (2)]) Everything was fine, until the moment I discovered that it did not work at all "well" or good in my opinion. When I decided to do the comparison of a two-digit number with one of one. Example: 2 is less than 13, that's obvious. But apparently JS interprets that 2 is greater than 13 because it interprets that 2 is greater than 13 because the 13 has a "1" and therefore JS ends up giving me the error message of the case where the first number is greater than the second. The "solution" was to put a 0 before 2 and there if JS, know that 2 is less than 13.
var cantidadea = $('#xcant2').val();
if($('#xcanta2').val()> cantidadea)
{
alert("Cantidad no valida, estas tratando de llevar mas de la cantidad existente (2)");
return false;
}
else
{
if($('#xcanta2').val()<0)
{
alert("Numero no valido. (Fila 2)");
return false;
}
else
{
cantidadb2 = $('#xcanta2').val();
coment2 = $('#xcoment2').val();
modelo2 = $('#xvalmerc2').val();
cantidade2 = $('#xcant2').val();
}
}