Require validators to be entered into the DOM as span elements.
If you are using JQUERY, get the element using the jQuery selector, then select the DOM element from your selection.
Here is an example:
Suppose you have a validator id = "MyReqValidator" request.
In your javascript file you will do:
//The jQuery Element: jqValidator = $("span[id$=MyReqValidator]"); //No the DOM element. This is what document.getElementById would return. domValidator = jqValidator.get(0) //Now enable your validator: ValidatorEnable(validator, true);
All in one line of code
ValidatorEnable( $("span[id$=MyReqValidator]").get(0), true);
Ioannis suarez
source share