A developer from India helped me create a pretty cool page, but he's since abadoned me with a few errors in his code. On my ROSTERS page for my basketball program, it's meant to display cells generated from this Google Spreadsheet. Only problem is it works for most grades, but 1st-8th aren't correctly referencing the right columns.

I don't know a ton about code, but everything looks like it matches up on the site.

These lines, for instance, are a part of the HTML that should display my spreadsheet's CENTRAL tab columns BG-BK

<li><a href="javascript:void(0)" target="_blank"><span style="float:left; color:#999999;">15 | <span id="3rd4th14">---</span></span> <span style="float:right; color:#999999;"><span id="3rd4thvalue14">---</span></span></a><div style="clear: both;"></div></li>

And these lines are the javascript that make it work.

 $('#3rd4th'+i).text(data[i][35]+' '+data[i][36]);
                     $('#3rd4thvalue'+i).text('|'+data[i][37]+' | '+data[i][38]+' | '+data[i][39]);

I figure since the same exact layout works for the other grades, this should easily follow suit. Fiddling with the numbers also produced nothing of worth.

Also of note is this problem started out with just one grade and has now spread to other grades over the course of a few months. I tried creating an entirely new document for it to reference, but the same error occurs. It's super slow loading, so I'd also be down to display the info via another avenue.

Any suggestions or fixes would be awesome. Thx.

Recommended Answers

All 5 Replies

CHEAT! Place the numbers 1 to 999 across a row in your spreadsheet so you can see if data[i][35] is picking up the right number. I'm not offering to fix your code but will share how I worked a similar issue somewhere else.

commented: Wow, I tried a ton of adjusting and nothing gave. I think it has something to do with the sheet names. Maybe there's a function I'm not seeing? +3

I tried adjusting a bunch of the numbers, and found no rhyme or reason. I noticed how the numbers are in order, even though my cells have blank spaces every 5th column, so maybe there's some function I'm not privvy to? I also noticed he's using the sheet labeled SchoolData, when the only sheet he should be using is CENTRAL. I mean, it should work either way... but maybe google only plays well if you only use the first sheet listed. The top 3 ELITE teams data comes from the CENTRAL sheet, and that stuff is perfect. When I tried to change everything to just CENRTAL, it all broke.

ANY HELP? I'm willing to pay for this, btw. I think this is way above my pay grade.

If you need to multipul words for the column title then insert a hypen, now that your googal sheet is setup you'll need to link the run on your website it will have a problemgenerating your data, and if you are never used a database using something like wordpress or anpther CMS platform willhave a learning curve and could be daunting to figure out how to use them.

Why this problem is not fixed by the developer himself?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.