Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrading Sheetsee on existing project & "Undefined" function #56

Closed
theoreticalgirl opened this issue Aug 1, 2014 · 14 comments
Closed

Comments

@theoreticalgirl
Copy link

I've been using Sheetsee.js to publish a list of upcoming tourdates for my band. I noticed the the plugin was updated, and now I'm having trouble getting things to display properly.

Advance warning: I am not a coder (but rather a designer by trade). I am good at plugging in javascript when necessary and tweaking little bits here and there, but by no means do I understand the code itself.

In my particular use, I don't have Sheetsee output into a <table> but rather a bunch of divs. I suppose the example that would best match what I've done is the "pretty pennies" section of the table demo. I guess this uses elements of ICanHaz.js per the "tips!" page, but I don't particularly know how it's doing that.

I tried copying and pasting the demo code to work with my own stuff, but no luck. I'm getting an "undefined is not a function" error, which I don't know how to fix. Help?

You can view the code here:

http://no-other.org/shows/new.php

One final comment: Kudos on making Sheetsee easy enough to use that someone as clueless as myself could figure it out! :)

@CrokinoleMaster
Copy link
Contributor

Hi. I'm not really sure what the problem is but I do notice you seem to have an extra closing </div> in your concerts template.

 {{/rows}}
 </div>
 </script>

It's a little hard to read since it's not indented so I could be wrong. :)

@theoreticalgirl
Copy link
Author

@huaruiwu thanks for the assistance. I opened this issue per @jlord's request. Hopefully she can help!

@max-mapper
Copy link

@theoreticalgirl Hi, I believe the problem is that you need to move all of your <script> tags, e.g.:

<script src="../js/ICanHaz.js"></script>
<script src="http://no-other.org/fdn/js/vendor/jquery.js.pagespeed.jm.m3Gbi6SVWh.js"></script>
<script src="../js/tabletop.js"></script>
<script src="../js/sheetsee.js"></script>

down to the very bottom of the page, a good place would be right after the line with <!-- Modals --> on it

@theoreticalgirl
Copy link
Author

@maxogden Great, let me give that a shot! Thank you!

@max-mapper
Copy link

the issue is that the sheetsee, icanhaz and tabletop script tags are above where the <script id="concerts" type="text/html"> template script is defined, but they need to run after it so that they can find the template when they go to look for it

@max-mapper
Copy link

also you might wanna give the <script id="concerts" type="text/html"> a different ID, as there is also <div id="concerts"></div> on the page, and IDs are supposed to be unique. But if you change the ID you will have to update other code that refers to it (hope this makes sense)

@theoreticalgirl
Copy link
Author

@maxogden but in the demos the IDs are the same—why does it work there?

@max-mapper
Copy link

@theoreticalgirl ah i see, that is also technically wrong (it works but it could cause unexpected behavior). in html you are only supposed to have 1 thing with an id on a page

@jlord
Copy link
Owner

jlord commented Aug 1, 2014

Woo woo, thanks @maxogden!

My bad on the ids being the same 😊 I'll fix that!

@theoreticalgirl
Copy link
Author

YAY IT IS WORKING, I LOVE ALL OF YOU

@max-mapper
Copy link

any west coast tours coming up? come play oakland!

@max-mapper
Copy link

oh also, protip, if you put a 'loading message' inside your concerts div, e.g. <div id="concerts">Loading shows...</div> then it will get replaced by the shows when they load

@theoreticalgirl
Copy link
Author

Thank you! (We will try to make it to the West Coast and let you know if we do!)

@CrokinoleMaster
Copy link
Contributor

@maxogden That was amazing! Definitely a pro

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants