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

HTML5 MOBILE WEB APPLICATION ive go to the part about local storage and my data is not saving correctly. help?

this part involves javascript, application.js and backbone.js

can you post what your code? so we can see if there's any errors and test it ?

Edit: handy tip

also if your using chrome you can Ctrl + shit I to bring up developer tools, select resources then local storage it will show you what's stored in it so you know if its saving to local storage or not.

i can email you the code so far might be easier then copying and pasting on here, I've basically been following the tutorial but got completely stuck/ lost at the bit where he introduces backbone.js and on the console it seems to return errors :/

mandana mirzaii i don't have a pro membership so cant really help with the tutorials (the HTML5 web app is a bonus video) but if you send me your code to [Removed email address] then ill see if i can help.

Got your email this morning. ill take alook this afternoon ( i have a JavaScript exam for uni ) so will be late afternoon.

1 Answer

Hey mandana mirzaii

i went through the HTML code first before i moved into JS (as JS isnt my strongest thing im still learning) and i noticed on the the save button you have the following

<button data-icon="check" onclick="document.bgColor='lightblue'">save</button>

the onclick doesn't look right it should call some sort of function. just now it seems like your trying to get it to change a background colour?

ive not read all the JS code as it will take me a few hours to that but it should look something like this

<button data-icon="check" onclick="save()">save</button>

id watch the part where they make the button/edit the button to see what it should be set to

hope this helps you in some way

Gary