The textbox focus event does not work, the value of x is correct, but the component is not filled with the new value, any tips? Regards.
$(document).ready(function () {
$('#txtSchool').textbox('textbox').bind('keypress focus blur', function (e) {
CallEvents($(this), e);})
});
function CallEvents(Sender, e) {
if (e.type == 'focus') {
var rd = $(Sender).prop('readonly');
var rd = false; //testing...
if (!rd) {
var q = String($(Sender).val());
var x = q.replace(/\./g, "a"); //replacing dot by a
//$.messager.alert('School', 'focus ' + x, 'info');
$(Sender).val(x); //does not fill the required field with the x content
return;
}
}
else if (e.type == 'keypress') {
//$.messager.alert('School', 'keypress ', 'info');
}
else if (e.type == 'blur') {
//$.messager.alert('School', 'blur', 'info');
}
};