Thanks for your reply,
being a noob, i still dont manage how to implement that. Also tried
out allowhtml, still...
here ist the page:
http://goldextra.servus.at/tb/mvs/list_test.html
could you tell what exactly i have to change to show column C as
hyperlinks?
here is the code:
---------------------------
<script type="text/javascript">
google.load('visualization', '1', {packages: ['table']});
</script>
<script type="text/javascript">
var isFirstTime = true;
var options = {'showRowNumber': false};
var data;
var queryInput;
// To see the data that this visualization uses, browse to
var query = new google.visualization.Query(
'http://spreadsheets.google.com/pub?
key=tWacOUdN1nLN_lKNRPhGbGQ&single=true&gid=0&output=html');
function sendAndDraw() {
// Send the query with a callback function.
query.send(handleQueryResponse);
}
function handleQueryResponse(response) {
if (response.isError()) {
alert('Error in query: ' + response.getMessage() + ' ' +
response.getDetailedMessage());
return;
}
data = response.getDataTable();
var table = new
google.visualization.Table(document.getElementById('querytable'));
table.draw(data, {'showRowNumber': false});
if (isFirstTime) {
init();
}
}
function setQuery(queryString) {
// Query language examples configured with the UI
query.setQuery(queryString);
sendAndDraw();
queryInput.value = queryString;
}
google.setOnLoadCallback(sendAndDraw);
function init() {
isFirstTime = false;
(new
google.visualization.Table(document.getElementById('table'))).draw(data,
options);
queryInput = document.getElementById('display-query');
}
function setQueryFromUser() {
setQuery(queryInput.value);
}
// Apply query language.
query.setQuery('SELECT A,B,C,E,D,F ORDER BY A DESC');
</script>
<style type="text/css">
<!--
.white {
color: #CCC;
}
-->
</style>
--------------------------------------------------------------------------------------
thanks for your help!
tobi
On Mar 25, 8:21 am, MC Get Vizzy <[email protected]> wrote:
> I'm not sure what you're getting at. Do you want to show a hyperlink in a
> google.visualization.Table object? You can use the option "allowHtml":true,
> then set the formatted value of the cells in your datatable, as in:
>
> for (var i = 0; i < dataTable.getNumberOfRows(); i++) {
> // Display a hyperlink in column 0.
> var url = dataTable.getValue(i, 0);
> url = '<a href="' + url + '">url</a>';
> dataTable.setFormattedValue(i, 0, url);
>
> }
>
> does that help?
>
> On Tue, Mar 23, 2010 at 11:44 AM, Tobi Harnegg <[email protected]> wrote:
> > Hey everyone,
>
> > I was wondering if i could use the API as a sort of Content Managment
> > for a Website?
> > I dont need a whole system like joomla or typo3, just to show some
> > entries and manage them in google docs.
> > (to use it as a database so to speak)
>
> > Even though successfully managed to show a queried table,
> > But could anyone show me an easy example how to take an entry of a
> > cell (eg: "http://google.com") out of spreadsheets and show it as a
> > hyperlink in a html site?
>
> > If thats possible...
>
> > thanks for help
>
> > tobi
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Google Visualization API" group.
> > To post to this group, send email to
> > [email protected].
> > To unsubscribe from this group, send email to
> > [email protected]<google-visualization-api%[email protected]>
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/google-visualization-api?hl=en.
--
You received this message because you are subscribed to the Google Groups
"Google Visualization API" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-visualization-api?hl=en.