:: Forum >>

how to put a link property to a cell

Hi, i´m alex, i´m trying to put to a one defined column a link property. A link to a URL getting de last value of the clicked row: (this is the code)

// SET LINK AND LINK VALUE
var link = new Active.Templates.Link;
link.setAttribute("target", "_top");
obj.setColumnTemplate(link, link_field);
// link_field its the column index where i want to put the link.

// link_template its where i have the value of the URL. and D.k ist my own register id

obj.setItemProperty("link", function(i){ return link_template + '&D.k=' + myData[i][parseInt(obj.getColumnProperty("count"))-1]; });


Can someone help me please?.... (sorry for my english :-)
ALEX LUTHOR
Tuesday, January 17, 2006
I´m alex again,...hehe I finally make the code Run...

i hope i can help someone, thanks Alex(ActiveWidgets) i saw your code in /javascript.forum.2331.8/creating-a-link-based-on.html and it helped me to run my code.

ALEX LUTHOR
ALEX LUTHOR
Tuesday, January 17, 2006
uuups i forget to put my code....


var link_field = "eval.viewtpl_field";
    if (link_field == '') { link_field = parseInt(obj.getColumnProperty("count"))-1; }
    var link_template = "eval.viewtpl";
    
    // SET LINK AND LINK VALUE
var link = new Active.Templates.Link;
link.setAttribute("target", "_top");
obj.setColumnTemplate(link, link_field);
obj.setDataProperty("link", function(i){ return link_template + '&D.k=' + myData[i][parseInt(obj.getColumnProperty("count"))-1]; });
ALEX LUTHOR
Tuesday, January 17, 2006

This topic is archived.


Back to support forum

Forum search