This is a migrated thread and some comments may be shown as answers.

Conflict with jQuery-style ASP.Net Form Validators

2 Answers 93 Views
Captcha
This is a migrated thread and some comments may be shown as answers.
jkregala
Top achievements
Rank 2
jkregala asked on 30 Sep 2010, 09:25 AM
Hello telerik team.

In some of our projects, we implement the extension from DelphicSage featured on this blog: http://www.delphicsage.com/home/blog.aspx?d=545 to enhance the aesthetics and usability of our websites. However, on one project we have used the Catcha control and noticed that it causes some sort of "conflict" with the extension and hinders it from running properly.

What could be done about this? Thanks much.

2 Answers, 1 is accepted

Sort by
0
Accepted
Lini
Telerik team
answered on 04 Oct 2010, 03:02 PM
Hello,

This seems to be caused by a problem in the ClearValidatorCallouts() method in the validators JavaScript code. The RadCaptcha control validator inherits the CustomValidator class, which does not need to have a ControlToValidate property set explicitly (see http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.basevalidator.controltovalidate.aspx for more information). The ClearValidatorCallouts() code from the page you gave, goes through all validators on the page and uses their "controltovalidate" property. If a validator does not have this property (such as a CustomValidator or RadCaptcha), the code will fail.

You should contact the author and ask if there is a newer version available or you can apply this simple fix:

change line 51 in validators.js from:

WebForm_RemoveClassName(inputControl, 'error');                                                  

to:

if (inputControl) WebForm_RemoveClassName(inputControl, 'error');                                                  


Sincerely yours,
Lini
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
jkregala
Top achievements
Rank 2
answered on 05 Oct 2010, 02:41 AM
Wow nice! Thanks Lini! :)
Tags
Captcha
Asked by
jkregala
Top achievements
Rank 2
Answers by
Lini
Telerik team
jkregala
Top achievements
Rank 2
Share this question
or