Handling edits


show more Handling edits provides you with in-depth training on Design. Taught by Joseph Lowery as part of the HTML5 Projects: Advanced To-Do List show less
please wait ...

Handling edits

This lesson is a bit of a mixed bag. We need to add three small functions, to handle three different tasks. First, we want to make sure that the main input field works properly if the user should press Enter or Return. Then, we want to update the value of a list item, that's being edited. And finally, we want to lay the groundwork for reacting when an item is dragged to a new location. So, I thought, who doesn't love a little potpourri every now and then. Let's get started. Here's the index.htm file from the chapter three 03_03 folder.

Let's go back down to the bottom of the page to add in our JavaScript code. We already have a mechanism in place to handle the user clicking on the add to list button. That's all the code that we inserted in the last lesson. But what happens if someone types in a new list item, and naturally hits Enter or Return? Well, it actually blanks out our existing list, at this point. Not what we want to have happen at all. So let's add a little code blo...

Handling edits
Video duration: 5m 58s 45m 50s Intermediate

Viewers:

Handling edits provides you with in-depth training on Design. Taught by Joseph Lowery as part of the HTML5 Projects: Advanced To-Do List

Subjects:
Design Web
Software:
HTML JavaScript CSS
Author:
please wait ...