Where To Put $.validator.setdefaults({ Onkeyup: False }) To Disable Mvc3 Onkeyup For Remote Attribue
I have seen many answers for how to disable the onKeyup setting that the MVC3 Remote Validator has. The responses I have seen is to enter this: $.validator.setDefaults({ onkeyup:
Solution 1:
You have to tell the code to execute after the DOM has been parsed. To do this, simply wrap the code in a $() function:
$(function() {
$.validator.setDefaults({ onkeyup: false });
}
This will ensure that the page elements will load, and then the script will be executed, setting your defaults.
Post a Comment for "Where To Put $.validator.setdefaults({ Onkeyup: False }) To Disable Mvc3 Onkeyup For Remote Attribue"