验证允许使用Javascript [英] Validator enable using Javascript

查看:63
本文介绍了验证允许使用Javascript的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在每个部分的自定义验证(呈现为选项卡)。当你在一个标签中的其他选项卡是隐藏的。因此,当我再继续向我要禁用客户端验证为隐藏的部分。
所以我打电话ValidatorEnable(假);

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);

但它的错误了作为val.Style是不确定的。如何解决这个问题。

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

我已经经历了以下问题已经消失了
<一href=\"http://stackoverflow.com/questions/2699445/enable-disable-requiredvalidator-on-client-side-customvalidator-not-firing\">Enable/disable在客户端RequiredValidator /没有的CustomValidator射击
它因此未帮助我。

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

即时帮助plssss

Immediate help plssss

推荐答案

难道你传递验证的只是ID为ValidatorEnable()方法?
您需要将元素本身,然后它确定:

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);

这篇关于验证允许使用Javascript的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆