Geeks With Blogs
Jonas Bush Blog.blog.blog.blog

If you ever find yourself needing to selectively disable an asp.net validator through javascript, you can do the following (in 2.0, not sure if this exists in 1.x):

function doSomething()
{
  var myVal = document.getElementById('myValidatorClientID');
  ValidatorEnable(myVal, false); 

}

Quick and easy! Sadly, not as easy to find through Google, so hopefully this post will help that. :)

Posted on Friday, August 11, 2006 8:57 AM ASP.Net | Back to top


Comments on this post: Disabling an ASP.Net Validator through Javascript

# re: Disabling an ASP.Net Validator through Javascript
Requesting Gravatar...
Thanks!! :D
Left by Paulo on Aug 14, 2006 6:21 PM

# re: Disabling an ASP.Net Validator through Javascript
Requesting Gravatar...
you are the one! thanks a lot!
Left by leandro koiti on Aug 18, 2006 7:57 AM

# re: Disabling an ASP.Net Validator through Javascript
Requesting Gravatar...
it exists in 1.x
GREAT!!!!!!!THANKS!!!!
Left by Zoria on Sep 01, 2006 1:43 AM

# re: Disabling an ASP.Net Validator through Javascript
Requesting Gravatar...
This is great. However, I would like to change the status of a control from invalid to valid rather than disable the validator. Any idea how I can do that?
Left by None on Oct 10, 2006 7:05 AM

# re: Disabling an ASP.Net Validator through Javascript
Requesting Gravatar...
Great it works fine and best example so far, good work but be sure while getting the id of any control with this new master/content page setup.
Left by Qazi on Nov 02, 2006 10:37 PM

# re: Disabling an ASP.Net Validator through Javascript
Requesting Gravatar...
It did not work for me. I had another solution of setting these three properties.

function disableValidator()
{
var myval = document.getElememtById('validator.ClientId');
myval.style.cssText="";
myval.style.display='none';
myval.style.accelerator=true;
}

It worked perfectly!!!
Left by Anand on Jan 31, 2007 9:49 PM

# re: Disabling an ASP.Net Validator through Javascript
Requesting Gravatar...
Great... thaks
Left by oola on May 04, 2007 11:49 AM

# re: Disabling an ASP.Net Validator through Javascript
Requesting Gravatar...
wow wow wow
Left by Naveed on May 07, 2007 7:57 AM

# re: Disabling an ASP.Net Validator through Javascript
Requesting Gravatar...
Thanks, you just saved me so much time!
Left by Frank Frenzel on May 18, 2007 8:28 PM

# re: Disabling an ASP.Net Validator through Javascript
Requesting Gravatar...
as my mom always told me: "KISS"
keep it simple stupid
Left by igal kakoon on Jun 03, 2007 7:09 AM

# re: Disabling an ASP.Net Validator through Javascript
Requesting Gravatar...
Is it work on asp.net 1.x
Left by Sanjib Saha on Aug 22, 2007 10:20 PM

# re: Disabling an ASP.Net Validator through Javascript
Requesting Gravatar...
function doSomething()
{
var myVal = document.getElementById('fvr');
ValidatorEnable(myVal, false);
}

I do not know whether I understand the myValidatorClientID well. I put my validation control name there. since after the end user click the check box, the text box show up. I have the validation control for the text box enable.
Left by frances on Sep 26, 2007 8:57 AM

# re: Disabling an ASP.Net Validator through Javascript
Requesting Gravatar...
The "ValidatorEnable" function i have used but it did't work, my problem is that i am using the dropdownlist and in the onchange event of the dropdown i have added client side script which check the specific value and on the bases of that value the regularexpressionvalidator enable/disable but my problme did't solved, i have tried many hours but :( no luchk any one can help me
thanks in advance
Left by Asim on Sep 27, 2007 9:29 PM

# re: Disabling an ASP.Net Validator through Javascript
Requesting Gravatar...
Asim, if you are using a drop down and validation is not working set the CauseValidation property of the dropdown to true and it will start working.

The Problem with the posters solution. Even If the validation is disabled using the code, but the server throws back error for requirefieldvaldiator control. So the validator has to be handled on the server side as well.
Left by Deepak Aggarwal on Sep 29, 2007 11:11 PM

# Re: Disabling an ASP.Net Validator through Javascript
Requesting Gravatar...
Look my real scenario is that , i have dropdownlist which contain the value for the credit card type, mean visa, Master Card, discover and etc , and i have a text box in which user can enter the Credit Card number, when the "Visa" is selected from the dropdownlist then the regularexpressionValidator validate the text box value other wise not
thanks in advance
Left by Asim Sajjad on Oct 01, 2007 10:18 PM

# re: Disabling an ASP.Net Validator through Javascript
Requesting Gravatar...
Thanks
worked for me in 1.1
Left by Tony on Oct 31, 2007 5:23 PM

# re: Disabling an ASP.Net Validator through Javascript
Requesting Gravatar...
Thanx. Works great!!!!
Left by bali on Jan 10, 2008 9:27 AM

# re: Disabling an ASP.Net Validator through Javascript
Requesting Gravatar...
Thanx. Works great!!!!!!!!!!
Left by bali on Jan 10, 2008 9:27 AM

# re: Disabling an ASP.Net Validator through Javascript
Requesting Gravatar...
Thanks yaar . ur really gr8
Left by Anish on Jan 16, 2008 5:33 AM

# re: Disabling an ASP.Net Validator through Javascript
Requesting Gravatar...
And it's the first one in Google now :)
Left by Liron Cohen on Jan 20, 2008 9:19 AM

# re: Disabling an ASP.Net Validator through Javascript
Requesting Gravatar...
It worked for me too. Thanks.
Left by Javier Callico on Jan 28, 2008 8:23 AM

# re: Disabling an ASP.Net Validator through Javascript
Requesting Gravatar...
Thanks! saved me lots of time
Left by George on Mar 13, 2008 7:25 AM

# re: Disabling an ASP.Net Validator through Javascript
Requesting Gravatar...
This is great, thanks, helped me a lot.

I hope this helps some of you who have their validators nested within other controls.

var myVal = document.getElementById('<%=Page.FindControl("myValidatorID").ClientID%>');

ValidatorEnable(myVal, true);
Left by Rorigo on Apr 01, 2008 6:06 PM

# re: Disabling an ASP.Net Validator through Javascript
Requesting Gravatar...
In the server the Page.IsValid will still be false.

http://www.FlickrMailer.com
Left by Anz on Apr 19, 2008 6:54 AM

# web project in asp.net 2.0
Requesting Gravatar...
I have created web project in visual studio 2.0 on my pc i work properly but when i open that project from other pc it gives error public token key etc how do i create project in share level sothat more than one user can work at a time on that project
Left by Ashwani Dwivedi on May 05, 2008 2:25 AM

# re: Disabling an ASP.Net Validator through Javascript
Requesting Gravatar...
I have problem with ValidatorEnable(myval,true).
Problem is that when i enable the validator on some client event which even doesn't cause postback, validation error message is displayed to me.
Left by Sonia on May 26, 2008 10:07 PM

# re: Disabling an ASP.Net Validator through Javascript
Requesting Gravatar...
you are a gawd
Left by kpg on Jun 11, 2008 1:03 PM

# re: Disabling an ASP.Net Validator through Javascript
Requesting Gravatar...
that's gr8
Left by Rajasekhar on Jul 24, 2008 5:25 AM

# re: Disabling an ASP.Net Validator through Javascript
Requesting Gravatar...
The "ValidatorEnable" function i have used but it did't work, my problem is that i am using the dropdownlist and in the onchange event of the dropdown i have added client side script which check the specific value and on the bases of that value the regularexpressionvalidator enable/disable but my problme did't solved

i change CauseValidation property of dropdown then in server side pagr.isvalid give false then waht to do?
thanks in advance
Left by Vipul on Aug 01, 2008 11:31 PM

# re: Disabling an ASP.Net Validator through Javascript
Requesting Gravatar...
thanks,

thanks a lot

excellent work done,not just to findout it,but solution put like this straightforward ,

great, i searched google, and this is the firstlink i found.

again thank you very much.
Left by vishal parekh on Aug 06, 2008 4:23 AM

# re: Disabling an ASP.Net Validator through Javascript
Requesting Gravatar...
What i want to do is just enabling or disabling my validators on client side. But I want to keep the validation itself on server side.

I tried to use
- ValidatorEnable(validator, bEnabled);
in order to enabled / disabled on client script my validators.

It works for System.Web.UI.WeControls.RequiredFieldValidator validators, but it does not for my own validators, which derive from BaseValidator ...

Any idea?
Left by phm on Sep 12, 2008 11:07 AM

# I have problem with the validation control inside update panel.
Requesting Gravatar...
I have 4 reqiuired field validation control inside a gridview which is inside an update panel. When i try to save the grid without enter any data it show the validation summary says that you have to enter values for these fields. But my problem is the error message show 4 times.. Anyone help me to figure my issue.. I am running out of time..
Left by Hari on Sep 18, 2008 5:34 AM

# re: Disabling an ASP.Net Validator through Javascript
Requesting Gravatar...
Its really gr8 .. but will this work if I call Page_ClientValidate();
Left by Hafiza on Sep 22, 2008 12:17 AM

# re: Disabling an ASP.Net Validator through Javascript
Requesting Gravatar...
Thanks - just what I was looking for
Left by Ivan on Sep 24, 2008 3:39 AM

# re: Disabling an ASP.Net Validator through Javascript
Requesting Gravatar...
Thanks, first hit in google and just what i was looking for! :)
Left by Arsi on Oct 07, 2008 5:52 AM

# re: Disabling an ASP.Net Validator through Javascript
Requesting Gravatar...
How to disable entire validations on the page in one g0 through
javascript
Left by kk on Oct 18, 2008 9:45 PM

# re: Disabling an ASP.Net Validator through Javascript
Requesting Gravatar...
THANKS MAN!
Left by Kago on Oct 19, 2008 2:43 AM

# re: Disabling an ASP.Net Validator through Javascript
Requesting Gravatar...
Does someone know how to fire required field validators in the client side on events other than the associated ones.
Left by Karthikeyan on Dec 05, 2008 3:19 PM

# re: Disabling an ASP.Net Validator through Javascript
Requesting Gravatar...
Karthikeyan,

I addressed that in this blog post:

http://geekswithblogs.net/jonasb/archive/2007/01/29/104893.aspx

Thanks :)

BTW, I'm amazed to have this many comments so long after writing the post. :)
Left by Jonas on Dec 05, 2008 3:36 PM

# re: Disabling an ASP.Net Validator through Javascript
Requesting Gravatar...
it didn't work for me
Left by saikrishna on Jan 26, 2009 7:52 AM

# re: Disabling an ASP.Net Validator through Javascript
Requesting Gravatar...
u are absolutely right...
Left by beck on Feb 26, 2009 2:41 AM

# re: Disabling an ASP.Net Validator through Javascript
Requesting Gravatar...
This doesn't work ... :(
Left by Cee Bee on Mar 26, 2009 11:11 AM

# re: Disabling an ASP.Net Validator through Javascript
Requesting Gravatar...
omfg U are a LIFE SAVER!!!!!!!!!!


:-)
Left by Tore Aurstad on Mar 31, 2009 10:24 AM

# re: Disabling an ASP.Net Validator through Javascript
Requesting Gravatar...
You made my day!
Left by DesperateProgrammer on Apr 06, 2009 10:12 AM

# re: Disabling an ASP.Net Validator through Javascript
Requesting Gravatar...
You are too good
Left by Umersh on Apr 13, 2009 10:19 AM

# re: Disabling an ASP.Net Validator through Javascript
Requesting Gravatar...
thanks. Really it's nice.
Left by chetas on Apr 22, 2009 12:48 AM

# re: Disabling an ASP.Net Validator through Javascript
Requesting Gravatar...
veryyyyyyyyyyyyyy amazing
Left by Rasha on Apr 26, 2009 5:20 AM

# re: Disabling an ASP.Net Validator through Javascript
Requesting Gravatar...
Thanks ...you are the best !!!!
Left by Muhammad Talal Shoaib on Apr 26, 2009 7:18 AM

# re: Disabling an ASP.Net Validator through Javascript
Requesting Gravatar...
It didn't work for me. I made sure I had the function name (ValidatorEnable) in correct case (if it was case-sensitive). I even put the alert() statements to make sure the code was being executed. I see that the code is being executed, but the validator is not disabled.

I finally resorted to use Custom Validator and took care of conditional validation in ServerValidate event.
Left by Rizwan on May 05, 2009 8:00 PM

# re: Disabling an ASP.Net Validator through Javascript
Requesting Gravatar...
You can use the enabled property of the validators. It works for me in dot net framework 2.0

var requiredFieldValidatorPrice = document.getElementById("<%= requiredFieldValidatorPrice.ClientID %>");
requiredFieldValidatorPrice.enabled = true;

I hope It helps
Left by Mohamed Adel Elkhodary on Jun 08, 2009 7:35 AM

# thanks a lot
Requesting Gravatar...
saved me time

Left by ram on Jul 06, 2009 12:32 AM

# re: Disabling an ASP.Net Validator through Javascript
Requesting Gravatar...
Strange but when I disable the validator by ValidatorEnable(myVal, false);

it makes the text box it is connected to disappear.
Left by gBurgur on Sep 12, 2009 8:38 AM

# re: Disabling an ASP.Net Validator through Javascript
Requesting Gravatar...
Someone suggested in a comment above just disabling the validator and that worked for me.

document.getElementById("rev_txtCmp_Item_Name").disabled = true;

Thanks for this discussion.
Left by gBurgur on Sep 12, 2009 8:44 AM

# re: Disabling an ASP.Net Validator through Javascript
Requesting Gravatar...
definitely appreciable.
Thanks buddy! saved lot of time
Left by bunty on Sep 17, 2009 4:00 AM

# re: Disabling an ASP.Net Validator through Javascript
Requesting Gravatar...
Thanks. Its pretty cool when you search for something you think is going to be hard to find, yet the first google result is a 2 second solution to it. thanks again!
Left by Fred on Sep 21, 2009 5:48 PM

# re: Disabling an ASP.Net Validator through Javascript
Requesting Gravatar...
thanx man ,,,saved my day,
keep up the good work
Left by ali on Dec 23, 2009 1:07 AM

# re: Disabling an ASP.Net Validator through Javascript
Requesting Gravatar...
Thanks its work gr8 but on Button_click Page.IsValid should be false
Left by Alisha on Feb 11, 2010 10:39 PM

# re: Disabling an ASP.Net Validator through Javascript
Requesting Gravatar...
Works great! Took your idea to a function...
<pre>
function toggleValidator(myRVF, state) {
var myVal = document.getElementById(myRVF);
ValidatorEnable(myVal, state);
}
</pre>
Left by Drew on Mar 09, 2010 11:14 AM

# W3C Validtator
Requesting Gravatar...
Nice information, I really appreciate the way you presented.Thanks for sharing..

Left by w3cvalidation on May 12, 2010 4:45 AM

# W3C Validator
Requesting Gravatar...
Nice information, I really appreciate the way you presented.Thanks for sharing..
Left by w3cvalidation on May 14, 2010 2:24 AM

# re: Disabling an ASP.Net Validator through Javascript
Requesting Gravatar...
Hi , really this is very useful information. But can anyone let me know that where I need to call this function doSomething()?
I would really appreciate any once response.
Thanks :)
Left by Ankit on May 26, 2010 10:17 PM

# re: Disabling an ASP.Net Validator through Javascript
Requesting Gravatar...
That doSomething function would be called wherever you need to disable the validators. So if you have some logic/circumstances where the validators aren't valid, that's where you'd call it.
Left by Jonas on May 26, 2010 10:19 PM

# re: Disabling an ASP.Net Validator through Javascript
Requesting Gravatar...
Thanks Jonas for your response. My Validator control is having property Display="Dynamic" and it is related to a textbox, so the error message start displaying at the sametime when I start entering anything wrong (special character) in that text box. Shall I call this function at the textbox event OnTextChanged?
Left by Ankit on May 26, 2010 10:24 PM

# re: Disabling an ASP.Net Validator through Javascript
Requesting Gravatar...
If you're wanting to disable the validator selectively when the user starts typing, then yes. The display=dynamic attribute means that the validator's error message will only show when it is necessary.
Left by Jonas on May 26, 2010 10:26 PM

# re: Disabling an ASP.Net Validator through Javascript
Requesting Gravatar...
Thanks Jonas, It's working fine now.. :) :) :)

u made my day.. :)
Left by Ankit on May 26, 2010 11:02 PM

# re: Disabling an ASP.Net Validator through Javascript
Requesting Gravatar...
<pre>
function toggleValidator(myRVF, state) {
var myVal = if(document.getElementById(<%=myRVF.ClientID%>").value=="")
{
document.getElementById(<%=myRVF.ClientID%>").focus();
return false;
}
ValidatorEnable(myVal, state);
}
</pre>
Left by Viju on Jun 05, 2010 2:30 AM

# re: Disabling an ASP.Net Validator through Javascript
Requesting Gravatar...
Apparently, if you run the built-in web server from Visual Studio (aka Cassini) then you may need the following solution:

"Enabling Cassini to use Client-Side Validation in ASP.NET"
By Zarko Gajic
http://delphi.about.com/od/adptips2005/qt/cassinivalidate.htm

Visual Studio 2008 SP 1 had this issue.
Left by T. Shane Whittet on Jun 18, 2010 7:49 AM

# re: Disabling an ASP.Net Validator through Javascript
Requesting Gravatar...
ValidatorEnable...works perfectly..wow :)))
Left by Saurabh on Jun 22, 2010 12:41 AM

# re: Disabling an ASP.Net Validator through Javascript
Requesting Gravatar...
Instead of the solution I mentioned above, I have installed IIS and run the following to get Cassini to work:
@C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis -i
@C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\aspnet_regiis -c
Left by T. Shane Whittet on Jun 24, 2010 11:21 AM

# re: Disabling an ASP.Net Validator through Javascript
Requesting Gravatar...
Thank you
Left by Prince Mathew on Jul 01, 2010 11:49 PM

# re: Disabling an ASP.Net Validator through Javascript
Requesting Gravatar...
Really quick and easy.
Thanks
Left by Nazmi Altun on Aug 02, 2010 5:46 AM

# re: Disabling an ASP.Net Validator through Javascript
Requesting Gravatar...
Works great for setting the value to false, does not seem to work setting it to true
Left by drytin on Sep 30, 2010 8:24 AM

# re: Disabling an ASP.Net Validator through Javascript
Requesting Gravatar...
Great, saved my time
Left by Kumar on Nov 14, 2010 6:07 AM

# re: Disabling an ASP.Net Validator through Javascript
Requesting Gravatar...
fantastic D:
Left by anon on Nov 23, 2010 3:56 PM

# re: Disabling an ASP.Net Validator through Javascript
Requesting Gravatar...
Thanks for posting this is very helpful and quickly
Left by Ivan on Dec 15, 2010 7:55 PM

# re: Disabling an ASP.Net Validator through Javascript
Requesting Gravatar...
I tried Disabling an ASP.Net Validator through Javascript using my own function because I couldn't find any online. But I didn't get the code right, and the only forum that discussed this said I had to download some exe files and install a script to get it to work. I'm very happy I eventually found your blog, it worked flawlessly from the first try.
Left by Donald Huisinga on Apr 28, 2011 4:48 AM

# re: Disabling an ASP.Net Validator through Javascript
Requesting Gravatar...
Nice, Just what the doctor ordered.

Thanks for posting/sharing...
Left by Moe on May 03, 2011 10:15 AM

# re: Disabling an ASP.Net Validator through Javascript
Requesting Gravatar...
Concise, and to the point. This will save some time!
Left by Ian on Jun 06, 2011 10:54 AM

# re: Disabling an ASP.Net Validator through Javascript
Requesting Gravatar...
Thanks, so great very easy
Left by omar on Aug 23, 2011 5:03 PM

# With JQUERY doesn't work,why?
Requesting Gravatar...
var validator = document.getElementById('<%=RequiredFieldValidator6.ClientID %>'); // works
var validator = $('#<%=RequiredFieldValidator6.ClientID %>'); // not
ValidatorEnable(validator, false);
Left by Mindaugas on Sep 01, 2011 4:18 AM

# re: Disabling an ASP.Net Validator through Javascript
Requesting Gravatar...
It works and disable the validator.
However it ignore the validate but it is visible in form!!!
Left by Maryam on Dec 07, 2011 11:41 AM

# re: Disabling an ASP.Net Validator through Javascript
Requesting Gravatar...
I used "ValidatorUpdateDisplay" function to change the visibility.

function disValidators() {
var val = document.getElementById("reqApply");
ValidatorEnable(val, false);
ValidatorUpdateDisplay(val);
}
function enaValidators() {
ValidatorEnable(document.getElementById("reqApply"), true);
}
function ValidatorUpdateDisplay(val) {
if (typeof(val.display) == "string") {
if (val.display == "None") {
return;
}
if (val.display == "Dynamic") {
val.style.display = val.isvalid ? "none" : "inline";
return;
}
}
val.style.visibility = val.isvalid ? "hidden" : "visible";
Left by Maryam on Dec 07, 2011 12:24 PM

# re: Disabling an ASP.Net Validator through Javascript
Requesting Gravatar...
asp.net is not showing validatorEnable , what should i do to make it work?
im using this code in <head> like this but it aint working.

<script type="text/javascript" language="javascript" >
function EnableDisableValidation()
{
var myVal = document.getElementById('UserIDRequiredFieldValidator');
ValidatorEnable(myVal, true);
}
Left by Janzi on Jan 12, 2012 10:00 PM

# re: Disabling an ASP.Net Validator through Javascript
Requesting Gravatar...
It is working in JavaScript that good what is not working in asp.net code for page.Isvalid please check.
Left by ranjit on Jan 26, 2012 9:44 PM

# re: Disabling an ASP.Net Validator through Javascript
Requesting Gravatar...
not goog
Left by werwer on Apr 10, 2012 3:58 AM

# re: Disabling an ASP.Net Validator through Javascript
Requesting Gravatar...
Thank you Very Much for such a wonderful Post..
This Helped me a lot..
Left by KiranKumar Roy on May 06, 2012 2:30 AM

# re: Disabling an ASP.Net Validator through Javascript
Requesting Gravatar...
Thank you so much :)
Left by Meghana on Sep 06, 2012 1:57 AM

# re: Disabling an ASP.Net Validator through Javascript
Requesting Gravatar...
Nice article. Thanks for posting. i have found one more please check

http://www.dotnetpools.com/Article/ArticleDetiail/?articleId=60&title=%20%20Dynamically%20Enable%20or%20Disable%20Validator%20and%20Page.IsValid%20Using%20C#%20In%20ASP.NET
Left by vinay on Nov 01, 2012 8:50 PM

# re: Disabling an ASP.Net Validator through Javascript
Requesting Gravatar...
Dude .... u simply saved me! THANKS A LOT.
Left by Rakesh on Nov 09, 2012 4:56 PM

# re: Disabling an ASP.Net Validator through Javascript
Requesting Gravatar...
but when postback occurs, it enable again & prevent postback.
Plz help.
Left by cseppd on Dec 10, 2012 11:33 PM

# re: Disabling an ASP.Net Validator through Javascript
Requesting Gravatar...
requiredfield validator is inside repeater control and i'm calling it on onclick event.. it doesn't work..
Left by pg on Jan 07, 2013 6:58 AM

# re: Disabling an ASP.Net Validator through Javascript
Requesting Gravatar...
Great it works for me. Thanks a lot
Left by aalok kumar dahayat on Feb 08, 2013 4:52 AM

# re: Disabling an ASP.Net Validator through Javascript
Requesting Gravatar...
var emailEmpty = $("#registerContent").find('[id$=email_blank]');
ValidatorEnable(emailEmpty, false);


It isn't working for me... Does someone know why???
Left by Norman on Jul 26, 2013 3:40 AM

# re: Disabling an ASP.Net Validator through Javascript
Requesting Gravatar...
var emailEmpty = $("#registerContent").find('[id$=email_blank]');
ValidatorEnable(emailEmpty, false);


It isn't working for me... Does someone know why???
Left by Norman on Jul 26, 2013 3:40 AM

# re: Disabling an ASP.Net Validator through Javascript
Requesting Gravatar...
Its Work Perfectly...Nice Solution..
(1)Which One fsater Javascript or Asp.net Validation?
(2)Which one faster if javascript disable then Asp.net Validation or we do using code for validation.
Left by Samir Khimani on Mar 05, 2014 7:09 AM

# re: Disabling an ASP.Net Validator through Javascript
Requesting Gravatar...
Nice Solution..
(1)Which One fsater Javascript or Asp.net Validation?
(2)Which one faster if javascript disable then Asp.net Validation or we do using code for validation.
Left by Samir Khimani on Mar 05, 2014 7:10 AM

# re: Disabling an ASP.Net Validator through Javascript
Requesting Gravatar...
Norman, I guess you have to get the DOM-element not the jQuery-element. Like so:

var emailEmpty = $("#registerContent").find('[id$=email_blank]')[0];
ValidatorEnable(emailEmpty, false);
Left by Jan on Sep 11, 2014 1:29 AM

Your comment:
 (will show your gravatar)


Copyright © Jonas Bush | Powered by: GeeksWithBlogs.net | Join free