0

I've figured out how to make an embedded google spreadsheet sortable, but I can't get it to be searchable.

http://ybpdatabase.blogspot.com/ is my site, and I have no access to or knowledge of php. In the past I've used another piece of google code to achieve these results (see my table @ http://ybpdatabase.blogspot.com/2012/10/database-search.html), but I had to manually insert each entry, rather than use the simpler embedded spreadsheet. I've posted the current code below. Any help would be great. Thanks!

<script type="text/javascript" src="http://www.google.com/jsapi"></script>
<script type="text/javascript">
google.load('visualization', '1', {packages: ['table']});
</script>
<script type="text/javascript">
var visualization;
function drawVisualization() {

var query = new google.visualization.Query(
'https://docs.google.com/spreadsheet/ccc?key=0AmWD_Na4J_4BdDllczJiVHFibnYwd2FabjhiQmlmZmc');

query.setQuery('SELECT A, B, C, D, E, F, G, H, I, J, K order by A asc label A "Name", B "M/F", C "Class", D "State", E "Height", F "Weight", G "Wing", H "Vert", I "Speed", J "Shot", K "Last Insp."');
query.send(handleQueryResponse);
}

function handleQueryResponse(response) {
if (response.isError()) {
alert('Error in query: ' + response.getMessage() + ' ' + response.getDetailedMessage());
return;
}

var data = response.getDataTable();

visualization = new google.visualization.Table(document.getElementById('table'));
visualization.draw(data, {legend: 'bottom'});
}
google.setOnLoadCallback(drawVisualization);
</script>
<div id="table"></div>

Edited by jonsan32

2
Contributors
4
Replies
16
Views
4 Years
Discussion Span
Last Post by jonsan32
0

Thanks. Sorry for the mis-post. Not knowing where to start is usually my greatest obstacle.

As for the links you provided, they don't include search. I'm familiar with plugins like those. I believe the only way to do search is through php... which I have no server for. I imght be screwed on this one.

1

I believe the only way to do search is through php... which I have no server for. I imght be screwed on this one.

Not necessary. You can used jQuery list:

http://listjs.com/

Since I look over your table it's kinda like a Excel Spreadsheet.

I mean you try this

http://listjs.com/examples/add-edit-remove

I mean you can always comment the button so noone can edit stuff.

If you need to edit and add stuff just uncomment the button and add the stats while online.

If someone was to type something to search it will get the stats.

I think you might need to redesign your table from the spreadsheet format to the webpage format.

I'm not a basketball fan but stats are not bad to read.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.