Monday, August 11, 2008

ValidatorCalloutExtender requires EnableClientScript set to True

I noticed recently that the a page I created recently had a CalendarExtender that doesn't work. Further investigation revealed that I have a Javascript error that says:
Sys.ArgumentException: Value must not be null for Controls and Behaviors.
Parameter name: element

I figured it must be one of the ValidatorCalloutExtender controls so I disabled all of them and there was no error! I enabled them one-by-one and noticed that only the ValidatorCalloutExtenders associated with a RequiredFieldValidator attached to an FCKEditor control caused the error. Now, an FCKEditor control has nothing to do with the ValidatorCalloutExtender, but I do remember having to set EnableClientScript to false to get the validation working with the RequiredFieldValidator.

I looked up other reports of the Javascript error associated with the RequiredFieldValidator and ValidatorCalloutExtender and those had the EnableClientScript attribute set to false too. I'm guessing that's the cause, but until I get a chance to verify it further, let's just leave it at speculation.

No comments: