jquery - Validator enable using Javascript - Stack Overflow

I have a custom validator in each sections (rendered as tabs). when you are in one tab the other tab is

I have a custom validator in each sections (rendered as tabs). when you are in one tab the other tab is hidden. so when i continue further to submit i have to disable client validation for the hidden section. So i call ValidatorEnable(, false);

but it errors out as val.Style is undefined. How to fix this..

I have gone through the following question already Enable/disable RequiredValidator on client-side / CustomValidator not firing it didnot help me.

Immediate help plssss

I have a custom validator in each sections (rendered as tabs). when you are in one tab the other tab is hidden. so when i continue further to submit i have to disable client validation for the hidden section. So i call ValidatorEnable(, false);

but it errors out as val.Style is undefined. How to fix this..

I have gone through the following question already Enable/disable RequiredValidator on client-side / CustomValidator not firing it didnot help me.

Immediate help plssss

Share Improve this question edited May 23, 2017 at 11:55 CommunityBot 11 silver badge asked May 19, 2011 at 16:47 user695663user695663 12.4k8 gold badges28 silver badges32 bronze badges 2
  • You should take a look at jQuery BabySteps plugin static.coryodaniel./stuff/examples/babysteps/index.html – Ortiga Commented May 19, 2011 at 16:59
  • any code to check this behavior? – gbs Commented May 19, 2011 at 23:25
Add a ment  | 

2 Answers 2

Reset to default 6

Is it possible that you are passing just the ID of the validator to the ValidatorEnable() method? You need to pass the element itself, then it works ok:

ValidatorEnable(document.getElementById('requiredfieldvalidatorID'), false);

Check if the element "val" exists .

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744863486a4597840.html

相关推荐

  • jquery - Validator enable using Javascript - Stack Overflow

    I have a custom validator in each sections (rendered as tabs). when you are in one tab the other tab is

    1天前
    70

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信