I'll begin by saying that I know very, very little about coding at all. I 
was hoping to get a google spreadsheet in a searchable format that will 
display only the records related to the keyword search. I found a great 
blog post that helped to explain this. I was able to get the searchable 
database. It shows all of the columns on my google spreadsheet. However, I 
have one column with a bunch of URLs. In the google spreadsheet itself, it 
displays with the active links. However, when I use the script, it only 
displays the text (whether I have the actual URL there or the text with the 
link to the URL). I saw in another post that I needed to be sure to enter 
allowHtml: true (case sensitive). However, it does not seem to work. 

Does anyone happen to know how to resolve this issue? Below is what I have 
for that portion of the coding (Again, I know very little of coding. I just 
copied the entire code & inserted the link to the google spreadsheet). 
Thanks in advance!

<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 query = new google.visualization.Query(
'GOOGLE URL GOES HERE');

query.setQuery('SELECT A, B, C, D, E where upper(A) like upper("%<?php echo 
$search; ?>%") or upper(B) like upper("%<?php echo $search; ?>%") or C like 
"%<?php echo $search; ?>%" or upper(D) like upper("%<?php echo $search; 
?>%") or upper(E) like upper("%<?php echo $search; ?>%")order by A asc');

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, {allowHtml: true, legend: 'bottom'});

}

google.setOnLoadCallback(drawVisualization);
</script>

<div id="table"></div>

</div>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Visualization API" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-visualization-api.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to