Click here to Skip to main content
15,891,951 members
Please Sign up or sign in to vote.
2.00/5 (1 vote)
See more:
Hi friends,

I have a problem here releated to javascript,

here is my javascript,
JavaScript
if()
{
   something here---
}
else
{
   if (Page_ClientValidate("valgrpDelinquency"))
   {
      ValidatorEnable(document.getElementById('<%= RequiredFieldValidator25.ClientID%>'), false);
      if (Sys.Extended.UI.ValidatorCalloutBehavior._currentCallout != null) 
      {
         Sys.Extended.UI.ValidatorCalloutBehavior._currentCallout.hide();                
      }
   }
}

here i want to disabled validator control,so here i have added above else part patch, but my ValidatorEnable() control not working here.

suggest me about that
Posted
Updated 31-Jan-12 2:53am
v2
Comments
Christian Graus 31-Jan-12 22:46pm    
Why is your validator given such a hard to read name ? Why not give it a real name ? Is your HTML showing what you expect ? What if you set a breakpoint in the js or put some alerts in to tell you what is happening ?

1 solution

C#
function doSomething()
{
  var myVal = document.getElementById('myValidatorClientID');
  ValidatorEnable(myVal, false);
}
 
Share this answer
 
Comments
Tech Code Freak 1-Feb-12 2:30am    
Correct. 5up!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900