Jump to content
Larry Ullman's Book Forums

Chapter 4 -- To-Do List -- Edit Or Delete List Entries


Recommended Posts

The script for the To-Do List in chapter 4 (page 204) allows for adding new list entries,

but no way to edit or delete (and maybe re-order) the entries after they've been entered.

 

Since the data is only stored in a client-side array, can those element values be accessed for editing?

 

~ David

Link to comment
Share on other sites

Yes, you can access the array for editing or deleting purposes in the same way that you accessed it for adding entries.

Simply write a JS event handler that handles a button click and then attach a function to that button that either edits or deletes the array as need be, and then display the new array results on the screen in whatever fashion you want.

Link to comment
Share on other sites

 Share

×
×
  • Create New...