Google Spreadsheet display with search function - Joomla! Forum - community, help and support
hi , need extention can display google spreadsheet , able search . have code works when calling php file iframe cannot set iframes height auto or 100%. when tried put code straight article(with plugin allows php articles installed) page shows searchbox button ,this:
''){ $search = $search;} else { $search = '';} ?>
and table headers no content.
this full code:
i added pic problem displayed.
any tips or suggestions appreciated, thank you!!
christie jones
''){ $search = $search;} else { $search = '';} ?>
and table headers no content.
this full code:
code: select all
<form id="form1" method="post" action ="<?php echo $_server['php_self']; ?>"> <label>
<input id="search" name="search" type="text" />
</label>
<label>
<input type="submit" />
</label>
</form>
<p>
<?php
$search= $_request['search'];
if ($search > ''){ $search = $search;} else { $search = '';}
?>
<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(
'http://spreadsheets.google.com/tq?key=my_test_table_link_id');
query.setquery('select ,b ,c ,d, e , f ,g upper(a) upper("%<?php echo $search; ?>%") or upper(b) upper("%<?php echo $search; ?>%")or upper(c) upper("%<?php echo $search; ?>%")or upper(d) upper("%<?php echo $search; ?>%")or upper(e) upper("%<?php echo $search; ?>%") or upper(f) upper("%<?php echo $search; ?>%")or upper(g) upper("%<?php echo $search; ?>%")order asc label "maandag", b "dinsdag",c "woensdag",d "donderdag", e "vrydag",f "saterdag", g "sondag" ');
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>
i added pic problem displayed.
any tips or suggestions appreciated, thank you!!
christie jones
Comments
Post a Comment