3.0 beta 2

Dynamic links in columns


I have still no answer to following question (sorry for posting again. But I don't know how to solve the problem):
I have a grid with 3 columns (name, email and country). The data for the grid is inside a xml-File. My problem is: i don't know, how to make the email-addresses in the email-column as links (For example: the email-address "example@example.com" should be a Email-link to example@example.com).
It would be great if you could help me because I'm a Active-Widgets beginner. Thanks a lot in advance,

August 26,
easiest thing to put the HTML for a mailto URL in place of
the address.

August 27,
Convert all special chars in html to entity chars before build into xml, Example, use htmlspecialchars in php script

August 28,
Thanks a lot!

I have converted all special chars!

August 30,
Set up a Link Template on that column.

var myGrid = ...; // dont forget to set up the "link" itemProperty
var mailTemplate = new Active.Templates.Link;
// override the default link behavior for mailto
mailTemplate.setAttribute("href", function() {
   return "mailto:" + this.getItemProperty("link");
} );
myGrid.setColumnTemplate( mailTemplate, emailColumnIndex );
August 31,
This doesn't work.

Using this example returns "Object does not support this property or method".

My kingdom for some decent documentation.
September 22,

The example given by gbegley on Tuesday, August 31, 2004, worked for me.

Thank you very much,

November 12,

This topic is archived.

See also:

Back to support forum


Version 2

Looking for AW 2.6 ?
The old site is here.