Home > DeveloperSection > Forums > How to Ennable RequiredFieldValidator With Javascript?
Kamlakar Singh
Kamlakar Singh

Total Post:28

Points:196
Posted on    October-20-2014 11:32 PM

 JavaScript JQuery  Validation 
Ratings:


 1 Reply(s)
 592  View(s)
Rate this:

function Validation() 

{

 if (document.Form1.txtfrom2.value.length > 0)

 ValidatorEnable(Rftxtfrom2, true); 

 ValidatorEnable(Rftxtjd2, true); 

 ValidatorEnable(Rftxtflno2, true); 

 ValidatorEnable(Rftxtdep2, true); 

 

</script>

i need to txtfrom2 text box contain 1 charecter 4 RequiredFieldValidator automaticaly ennable true  

thanks
 



Alex Leblois
Alex Leblois

Total Post:67

Points:471
Posted on    October-20-2014 11:33 PM

Use below


function Validation() 
{
 if (document.Form1.txtfrom2.value.length > 0)
 ValidatorEnable(document.getElementById(Rftxtfrom2), true);
ValidatorEnable(document.getElementById(Rftxtjd2), true);
ValidatorEnable(document.getElementById(Rftxtflno2), true);
ValidatorEnable(document.getElementById(Rftxtdep2), true);

Don't want to miss updates? Please click the below button!

Follow MindStick