fix jQuery compatibility issue

This commit is contained in:
Jan Dittberner 2015-09-25 13:01:42 +02:00
parent 0d54abd22f
commit 59eaea87ba

View file

@ -1,7 +1,7 @@
## -*- coding: utf-8 -*- \ ## -*- coding: utf-8 -*- \
<%doc> <%doc>
Helper JavaScript for the data input form. Helper JavaScript for the data input form.
Copyright © 2009, 2010 Jan Dittberner <jan@dittberner.info> Copyright © 2009, 2010, 2015 Jan Dittberner <jan@dittberner.info>
This file is part of DDPortfolio service. This file is part of DDPortfolio service.
@ -84,7 +84,7 @@ function updateFields(data, textStatus) {
} }
function onChangeShowAll(event) { function onChangeShowAll(event) {
if ($('#showall').attr('checked')) { if ($('#showall').prop('checked')) {
for (var fielddiv in allfielddivs) { for (var fielddiv in allfielddivs) {
$(allfielddivs[fielddiv]).show(); $(allfielddivs[fielddiv]).show();
} }
@ -96,10 +96,10 @@ function onChangeShowAll(event) {
} }
function onBlurEmail() { function onBlurEmail() {
if ($.trim($('#email').attr('value')).length > 0) { if ($.trim($('#email').prop('value')).length > 0) {
$.ajax({ $.ajax({
'url' : '${h.url(controller="showformscripts", action="fetchdddata")}', 'url' : '${h.url(controller="showformscripts", action="fetchdddata")}',
'data' : {'email' : $('#email').attr('value')}, 'data' : {'email' : $('#email').prop('value')},
'dataType' : 'json', 'dataType' : 'json',
'success' : updateFields, 'success' : updateFields,
'error' : function(request, textStatus, errorThrown) { 'error' : function(request, textStatus, errorThrown) {