i am calling a function onblur .. that function call an ajax and that ajax get string ..
now i want if value in string is avail .. then text box become red ..
my ajax code is
function ucheck(){
dojo.xhrPost({
// The URL to request
url: "ucheck",
timeout : 3000 ,
content: {
username: dojo.byId("pref_id").value
},
// The method that handles the request's successful result
// Handle the response any way you'd like!
load: function(result) {
var fi=result;
document.getElementById('co').innerHTML=fi // this is print the value in lable
}
});
}
I am not sure if you tried the following example and changed your code accordingly:
https://dojotoolkit.org/reference-guide/1.8/dijit/form/ValidationTextBox-tricks.html#dijit-form-validationtextbox-tricks