handle empty email field onBlur event correctly

This commit is contained in:
Jan Dittberner 2010-06-11 23:14:30 +02:00
parent 95bc1f433d
commit 70d72e5f28

View file

@ -65,7 +65,12 @@ function updateFields(data, textStatus) {
} }
} }
function onChangeShowAll(event) {
alert(event);
}
function onBlurEmail() { function onBlurEmail() {
if ($.trim($('#email').attr('value')).length > 0) {
$.ajax({ $.ajax({
'url' : '${h.url_for(action='fetchdddata')}', 'url' : '${h.url_for(action='fetchdddata')}',
'data' : {'email' : $('#email').attr('value')}, 'data' : {'email' : $('#email').attr('value')},
@ -75,6 +80,7 @@ function onBlurEmail() {
$('#email').focus(); $('#email').focus();
} }
}); });
}
} }
$(document).ready(function() { $(document).ready(function() {