Hi
Try to use getValue() method. This works for me:
HTML Code:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>TextField value on blur</title>
<link rel="stylesheet" type="text/css" href="http://dev.sencha.com/deploy/ext-3.4.0/resources/css/ext-all.css" />
<script type="text/javascript" src="http://dev.sencha.com/deploy/ext-3.4.0/adapter/ext/ext-base-debug.js"></script>
<script type="text/javascript" src="http://dev.sencha.com/deploy/ext-3.4.0/ext-all-debug.js"></script>
<script type="application/javascript">
Ext.onReady(function() {
new Ext.Viewport({
layout : 'border',
renderTo : Ext.getBody(),
items : [{
region : 'center',
layout : 'form',
items : [{
xtype : 'textfield',
fieldLabel : 'PLZ *',
width : 50,
maxLength : 5,
minLength : 5,
allowBlank : false,
id : 'zip',
maskRe : /^[0-9]$/,
listeners : {
blur : function(field) {
if (!field.isValid()) {
alert('Bitte PLZ überprüfen !');
return;
}
Ext.Ajax.request({
url : '/admin/company/findregion/',
method : 'POST',
params : {
plz : field.getValue()
},
success : function(response, action) {
},
failure : function(response, options) {
}
});
}
}
}]
}]
});
});
</script>
</head>
<body></body>
</html>