Code error fixed #7: Returning Parse database class query data via Underscore template

Haven’t had time to note #5 and #6 but skipped to #7 in the hope that I’ll revisit those. But compelled to record #7, because it epitomizes my perseverance in learning this stuff. My project must have a browse feature. The splash page has had one prominent button that says “Browse”, after all. But it was starting to look like it might not, because my attempts at rendering Parse data via an Underscore template were failing, and I got sidetracked by design issues. (I needed to focus on some design issues, yes. But this browse feature got tossed aside along with this unresolved programming dilemma.)

So, I won’t rationalize why I tried each of these, and this is just a sampling. I can’t recall. But I only had so many prior working examples in projects, and the internet doesn’t have a whole lot of examples. And I’m pulling from a Parse database, for whatever that’s worth.


No error, but no data returned.


(where petname is one of the properties I’m trying to return from a class called Pet)

ReferenceError: petname is not defined


ReferenceError: petname is not defined


ReferenceError: petname is not defined


ReferenceError: petname is not defined

Finally…what worked

I never would have went astray with the JSON.stringify syntax had I, days ago, simply realized what was essentially a typo of an errant parenthesis, but it was one of those errors where the parenthesis wasn’t what was throwing any error.

Anyway, moving on…

meta-blogging note: I must get off of this theme and or pay to be able to customize. This looks horrible.


Code error fixed #4: Append Parse query results to a form dropdown

After I’ve done my Parse query of a person’s pets, I need all the pet names in a dropdown field. Leaving out lots of code, but essentially

for (var i = 0; i < results.length ; i++) {

where pet names is my selection form field. Seems simple, enough, I know, but…sigh…