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 trialSean Flanagan
33,235 PointsLocalstorage won't save searches
Hi.
I typed in a search term and clicked the Search button but the term didn't appear.
This is my workspace:
I would appreciate any help.
3 Answers
Steven Parker
231,127 PointsIn index.html on line 45, the function "saveSearchString" takes no arguments. But the code body appears to be expecting an argument named "str".
Sean Flanagan
33,235 PointsI've looked at my workspace, "Using Local Storage with JavaScript - Local Storage Project"
I can see my index.html but now the app.js file is missing and there are some files that don't belong there. In a folder called "stylesheets" are three files:
page.css.map, page.css and page.sass.
I don't know what's happened or what to do.
Sean
Steven Parker
231,127 PointsThe JavaScript is embedded in the HTML file. And I just assumed you wrote the CSS in sass and then compiled it. The HTML file uses the page.css.
Sean Flanagan
33,235 PointsHi Steven.
I previewed the workspace and it worked perfectly. Sorry about all that. It just came as a bit of a shock. I'd started a course about Sass and I thought the code from there had transferred to the Local Storage workspace. I panicked.
Thank you for all your help. I've given your first response both an up vote and Best Answer.
Sean
Sean Flanagan
33,235 PointsSean Flanagan
33,235 PointsHi Steven.
I've made some changes to this function but still no luck.
Is this right?
Cheers!
Steven Parker
231,127 PointsSteven Parker
231,127 PointsAdding the "str" argument to the function was the only change I made and then each term I searched was added to the list.