HOW TO ENNABLE REQUIREDFIELDVALIDATOR WITH JAVASCRIPT?

Kamlakar Singh

Total Post:28

Points:196
Posted by  Kamlakar Singh
 906  View(s)
Ratings:
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
 

  1. Alex Leblois

    Post:67

    Points:471
    Re: How to Ennable RequiredFieldValidator With Javascript?

    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);

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!