The author's statement on ajaxvalidator is as follows:
Ajaxvalidator is the most frequently asked question. Correct a bug (thanks to "too many errors √") and explain the most important questions.
BUG: no matter whether the verification is successful or not, when the control gets the focus again and loses the focus again, the tip prompts will be stuck in the focus prompt.
History of previous upgrades:
A. Add an addidvalue attribute for ajaxvalidator (whether to automatically add the ID and value to the end of the URL parameter)
To fix the bug that ajaxvalidator cannot get the runtime value when Configuring Information, the plug-in automatically adds a webpage parameter in the form of "id = value" after the URL.
On the server side, you can use request. querystring ["ID"] to set the value. For more information, see demo1 user name input and default. aspx.
Exception description:
Garbled characters still occur during development.
For example:
$ ("# Thename "). formvalidator ({onfocus: "The user name must be at least 6 characters and a maximum of 40 characters", oncorrect: "The input format is correct "}). inputvalidator ({min: 6, Max: 40, onerror: "The user name you entered is invalid. Please confirm "})//. regexvalidator ({Regexp: "username", datatype: "Enum", onerror: "Incorrect username format "})
. Ajaxvalidator ({
Type: "Get ",
URL: "login. Do ",
Data: "Action = isexist ",
Datatype: "XML ",
Success: function (data ){
Root = data.doc umentelement;
VaR rowset = root. selectnodes ("// Delete ");
If (rowset. Item (0). selectsinglenode ("value"). Text = "0 ")
{
Return true;
}
Else
{
Return false;
}
},
Buttons: $ ("# saveid "),
Error: function () {alert ("the server does not return data. The server may be busy. Please try again ");},
Onerror: "This user name is unavailable. Please change the user name ",
Onwait: "the validity of the user name is being verified. Please wait..." // function () {alert ($ ("# pcode"). Val ());}
});
Note:
Data: "Action = isexist & thename =" + $ ('# thename '). val (). This method is invalid because $ ('# thename '). val () is fixed, and is the initial value, usually empty.
Modify source code:
Formvalidator. js
// Ajax Verification
Ajaxvalid: In the function (returnobj) Method
Set
VaR parm = "clientid =" + ID + "&" + ID + "=" + encodeuricomponent (srcjo. Val ());
Changed:
VaR parm = "clientid =" + ID + "&" + ID + "=" + encodeuricomponent (srcjo. Val ()));
Because only the front-end code is encoded twice, the backend decoding can solve the garbled problem.
Thename = java.net. urldecoder. Decode (thename, "UTF-8 ");
Note that the front-end must be encoded twice, otherwise it will still be garbled.