diff --git a/app/views/projects/_new_respond.html.erb b/app/views/projects/_new_respond.html.erb index 25e448ff4..f0d43c439 100644 --- a/app/views/projects/_new_respond.html.erb +++ b/app/views/projects/_new_respond.html.erb @@ -23,10 +23,13 @@ function setMaxLength() { function checkMaxLength() { var maxLength = this.getAttribute('maxlength'); var currentLength = this.value.length; - if (currentLength > maxLength) + alert(currentLength); + if (currentLength >= maxLength) { this.relatedElement.className = 'toomuch'; - else + } + else { this.relatedElement.className = ''; + } this.relatedElement.firstChild.nodeValue = currentLength; }