That works! I just added "http://" before my parameter : var formatter = new google.visualization.TablePatternFormat('<a href="http://{1}" target="_blank">{0}</a>');
Thanks you;) Bye, Mat On 14 jan, 10:26, VizGuy <[email protected]> wrote: > You will have to send some more information, or try to debug it locally with > javascript alerts and so on.Generally, when you set the "href" parameter > with a link that starts with the protocol (http://, https:// , ..) then the > current site base is not added to it as a prefix. > > Regards, > VizGuy > > On Wed, Jan 14, 2009 at 11:21 AM, Mathieu <[email protected]>wrote: > > > > > Yeah, i am sure; > > (and i use the gadget "My gadgets" to deal with the old version > > cached...") > > > On 14 jan, 10:12, VizGuy <[email protected]> wrote: > > > This should work.Are you sure you have no issue with an old version > > cached > > > in your browser? > > > > Regards, > > > VizGuy > > > > On Wed, Jan 14, 2009 at 10:52 AM, Mathieu <[email protected] > > >wrote: > > > > > i don't see exacty what i can do : > > > > > because when i use this : var formatter = new > > > > google.visualization.TablePatternFormat('<a href="{1}" target="_blank"> > > > > {0}</a>'); > > > > my link is still the same as before : > > > >http://www.google.com/ig/www.adobe.com > > > > > so, how can i delete this part "http://www.google.com/ig/" ?? > > > > > Thanks by advance, > > > > > Mat > > > > > On 21 déc 2008, 13:39, VizGuy <[email protected]> wrote: > > > > > 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.comin > > > > 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 -~----------~----~----~----~------~----~------~--~---
