handle empty email field onBlur event correctly
This commit is contained in:
parent
95bc1f433d
commit
70d72e5f28
1 changed files with 15 additions and 9 deletions
|
@ -65,16 +65,22 @@ function updateFields(data, textStatus) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function onChangeShowAll(event) {
|
||||||
|
alert(event);
|
||||||
|
}
|
||||||
|
|
||||||
function onBlurEmail() {
|
function onBlurEmail() {
|
||||||
$.ajax({
|
if ($.trim($('#email').attr('value')).length > 0) {
|
||||||
'url' : '${h.url_for(action='fetchdddata')}',
|
$.ajax({
|
||||||
'data' : {'email' : $('#email').attr('value')},
|
'url' : '${h.url_for(action='fetchdddata')}',
|
||||||
'dataType' : 'json',
|
'data' : {'email' : $('#email').attr('value')},
|
||||||
'success' : updateFields,
|
'dataType' : 'json',
|
||||||
'error' : function(request, textStatus, errorThrown) {
|
'success' : updateFields,
|
||||||
$('#email').focus();
|
'error' : function(request, textStatus, errorThrown) {
|
||||||
}
|
$('#email').focus();
|
||||||
});
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
|
|
Loading…
Reference in a new issue