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 trial

JavaScript DOM Scripting By Example Adding and Removing Names Removing Names

Not 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
Steven Parker
231,269 Points

The 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". :+1:

Now if you wanted to get really fancy, you could disable and dim the button while the input has no valid content. :wink:

this 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?