100 Days of Code: Day 9

Danielle Moss
100daysofcode
Published in
2 min readMar 15, 2017

Worked on my Wikipedia Viewer tonight. Made a lot of progress and was ready to stop for the evening when I decided to try and create a “Clear Results” button. Seems easy, right? Yeah it was, until nothing worked for some reason. After about 30mins I realized I’m an idiot and the button I had copied to make the “Clear Results” button had the same id as the “Search” button. And of course this was after I had removed all my code thinking something was wrong with what I had.

So I’m going to attempt to try and get my code working again. If I can have results show up on a page after the first try, I know I can get them to show up after the 100th try. At least that’s what I tell myself to stop from losing my mind.

So my dear readers, always remember to save your work, make a Gist as a backup, stay classy, be awesome, and code on!

Edit: After another 25–30mins, I finally have the JSON result showing back up on the screen. And I have it saved as a Gist in case I get stupid again and decide to redo all of my code. Tempted to do the “Clear Results” button just to make sure it will be done and I can move on, but I don’t want to tempt fate too much tonight.

Edit #2: So I tempted fate anyway and won this time around. (For once! Gosh I really needed this win!) I was able to set up the “Clear Results” button for the search results area. Also was able to set up the url so it would add in the user input as part of the query. And got the Cross-Origin bullshit to go away. And I saved my progress and backed it up as a Gist. Now I’m actually going to bed.

Edit#3: Set up the “Clear Results” button to also clear the text input field. Now definitely going to bed.

--

--

Danielle Moss
100daysofcode

Finding myself through process of elimination and lots of error codes, eventually getting all the wrong pieces right.