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 Interactive Web Pages with JavaScript Traversing and Manipulating the DOM with JavaScript Changing Classes

interactive pages with javascript

i was able to follow the steps and complete the app.. but it has no utility. Everytime when page refreshes it resets the lists.There must be something to make changes permanent.. please suggest.

2 Answers

Richard Duncan
Richard Duncan
5,568 Points

Hi Shah,

Some context around the user journey through your application would be useful here but off the top of my head: -

  • Store data locally in cookies
  • POST the data to a server and store in a database

HTML5 also offers storage in the form of localStorage and sessionStorage

Here's some documentation on the latter: -

Great suggestions! I find that localStorage is really easy to use and set up (since it can be tested locally), especially if you lack experience with server-side scripts and databases.

James Barnett
James Barnett
39,199 Points

JavaScript is a client-side language. An actual useful tool requires not just JavaScript but also knowledge of CSS for the styling as well as backend language (such as PHP) and knowledge of how an SQL database works.

As a way to learn JavaScript building a to-do list is a useful exercise.