Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialCaleb Andruss
Full Stack JavaScript Techdegree Student 8,466 PointsNot actually a question just a good extra feature i added
So I hit enter and it added a blank invite which seems buggy to me. To fix this I added an if statement reading... if(input.value == ''){ return false; } Wanted to share just because if it bothered me I'm sure someone else was thinking about it too.
2 Answers
Steven Parker
231,248 PointsThe course examples are kept intentionally simple, but that's a nice example of the kind of improvement that can make a real-life UI more "friendly".
Now if you wanted to get really fancy, you could disable and dim the button while the input has no valid content.
Vaidehi S
5,731 Pointsthis only is valid if we click submit button without entering anything. but if we just key spacebar 3 times and then submit then it take the entry. How can we fix that?