You have a typo in the formatter.
You have there:
'<a href="?url={1}"
But you probably mean
'<a href="{1}"
and the url part is a leftover from before.
This makes the url a relative one (as it starts with ? and not with a
protocol), and your base url is of the gadget.

In addition, in the code you sent you define a view but you never use it (it
looks like a copy of the example, but in case you meant to use it, well, you
don't).

Regards,
VizGuy




On Wed, Dec 17, 2008 at 12:48 PM, Mathieu <[email protected]>wrote:

>
> Hello everyone;
>
> I try to use the TablePatternFormat to have links (with a table) on
> external web page but i don't succeed;
>
> I do this :
>
> var formatter = new google.visualization.TablePatternFormat('<a href="?
> url={1}" target="_blank">{0}</a>');
>
> With my iGoogle gadget, i get this :
>
> 1 | Test | www.adobe.com
> etc..   with a link on the word "Test" like this : "http://
> 110.gmodules.com/ig/ifr?url=www.adobe.com"
>
> And my problem is that i try to delete this "http://110.gmodules.com/
> ig/ <http://110.gmodules.com/ig/>" to open the web page adobe.com in an
> external window, is it
> possible ?
>
> Thanks by advance,
>
> Mathieu
>
> My code;
>
> function draw(response) {
>        if (response.isError()) {
>          alert("Error in query")
>        }
>
>        var ticketsData = response.getDataTable();
>        var table = new google.visualization.Table
> (document.getElementById('patternformat_div'));
>
>                var formatter = new
> google.visualization.TablePatternFormat('<a
> href="?url={1}" target="_blank">{0}</a>');
>                formatter.format(ticketsData, [0,1]); // Apply formatter and
> set the
> formatted value of the first column.
>
>                 var view = new google.visualization.DataView(ticketsData);
>                 view.setColumns([0]); // Create a view with the first
> column only.
>
>        table.draw(ticketsData, {allowHtml: true, showRowNumber:
> true});
>      }
> >
>

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to