Un foro de discusión para nuestra comunidad de hispano hablante
By Gerardo
#788597
Deceo validar un campo con javascript desde el dynaform, pero deseo al realizar la validación que los textbox que utilizo se limpien: esta es la validacion.
Code: Select all
$("#FinTal").setOnchange(function() {
   var inital = $("#IniTal").getValue();
   var fintal = $("#FinTal").getValue();
   if (inital > fintal) {
       alert ("El valor inicial del talonario no puede ser mayor  que el valor final");
       $("#IniTal").setValue()="";
       $("#FinTal").setValue()="";
   }
});
User avatar
By amosbatto
#788600
Tienes que hacerlo asi:
Code: Select all
$("#FinTal").setOnchange(function(newVal, oldVal) {
   var inital = parseFloat($("#IniTal").getValue());
   var fintal = parseFloat(newVal);
   if (inital > fintal) {
       alert ("El valor inicial del talonario no puede ser mayor  que el valor final");
       $("#IniTal").setValue('');
       $("#FinTal").setValue('');
   }
});
$("#IniTal").setOnchange(function(newVal, oldVal) {
   var fintal = parseFloat($("#FinTal").getValue());
   var inital = parseFloat(newVal);
   if (inital > fintal) {
       alert ("El valor inicial del talonario no puede ser mayor  que el valor final");
       $("#IniTal").setValue('');
       $("#FinTal").setValue('');
   }
});
Want to create your own meme coin?

In the world of cryptocurrencies, a unique and exc[…]

The market for cryptocurrencies is demonstrating a[…]

What's SAP FICO?

Embarking on a dissertation can be one of the most[…]

Hello. For rental housing, there are software solu[…]