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

General Discussion

HTML5 Mobile JavaScript: Creating the Form View - I need help!

I'm having trouble with getting my code working. You can check it out here:

http://pastebin.com/raw.php?i=mjZhy8Wb

The console throws one error = Cannot set property 'new_form' of undefined

I tried copying the code as best I could but I still couldn't get it to work... any suggestions?

3 Answers

Jim Hoskins
STAFF
Jim Hoskins
Treehouse Guest Teacher

That means that App.views is undefined when you try to assign App.views.new_form.

Near the top of your code update to this and it should fix it (or change the error)

var App = {
  stores: {},
  views: {}
}

Thanks Jim! Now the console is throwing no errors

I still can't save a note :/

Heres a quick video... The console is throwing no errors (besides the XML request), but the note doesn't save on Safari, or Chrome:

http://screencast.com/t/fE91L0oGT

Heres my code:

http://pastebin.com/9NrhXwML

EDIT: Nevermind, I fixed it by putting my files on site44.com - highly recommended!