function Validation()
{
if (document.Form1.txtfrom2.value.length > 0)
ValidatorEnable(Rftxtfrom2, true);
ValidatorEnable(Rftxtjd2, true);
ValidatorEnable(Rftxtflno2, true);
ValidatorEnable(Rftxtdep2, true);
}
i need to txtfrom2 text box contain 1 charecter 4 RequiredFieldValidator automaticaly ennable true
Joginder BangerPosted Mar 28, 2015, 4:03 PM
document.getElementById("<%=ReqVal.ClientID%>").style.visibility = "hidden"; document.getElementById("<%=ReqVal.ClientID%>").enabled = false;
ENABLE
document.getElementById("<%=ReqVal.ClientID%>").style.visibility = "visible"; document.getElementById("<%=ReqVal.ClientID%>").enabled = true;
And look below example also
ValidatorEnable(document.getElementById(validatorId), false); var hidden = document.getElementById(hiddenID); hidden = "1";Then in your load event:
If (hidden = "1") then validator.enabled=false end if
Abhijeet SinghPosted Mar 28, 2015, 3:33 PM
http://help.campaignmonitor.com/topic.aspx?t=194
SaiRojaPosted Oct 21, 2014, 1:03 AM
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);
}