Hi,
I am using jquery to disable validation controls in aspx page on load and than on button press I want to enable them. I have coded the below mentioned script for this. but there is an issue. Both functions (enabling and disabling validation controls) are fired on page load.
Please guide me on this.
thanks
<script type="text/javascript">
function pageLoad()
{
$.each(Page_Validators, function(index, validator) {
ValidatorEnable(validator, false);
});
$("input[id$='btnNext']").click(enable());
}
function enable()
{
alert ("Enable function called");
$.each(Page_Validators, function(index, validator){
ValidatorEnable(validator, true);
});
}
</script>