Problem Link/image
Hi,
In my active widget i apply firt an image template that works to the first column (0) and after i apply a link template to the column 2.
But when i apply the link template, it also applies the image template to the column 2 at the same time so i also have the image to the column 2 and i don't want.
Any idéa or help ?
My code :
Thanks,
Greg
In my active widget i apply firt an image template that works to the first column (0) and after i apply a link template to the column 2.
But when i apply the link template, it also applies the image template to the column 2 at the same time so i also have the image to the column 2 and i don't want.
Any idéa or help ?
My code :
$html = "<"."script".">\n";
$html .= $columns;
$html .= $rows;
$html .= "try {\n";
$html .= " var $name = new Active.Controls.Grid;\n";
$html .= " $name.setRowCount($row_count);\n";
$html .= " $name.setColumnCount($column_count);\n";
$html .= " $name.setDataText(function(i, j){return ".$name."_data[i][j]});\n"."";
$html .= " $name.setColumnText(function(i){return ".$name."_columns[i]});\n";
$html .= "obj.setDataProperty(\"image\",function(i, j){return ".$name."_data[i][23]});";
$html .= "obj.setColumnTemplate(new Active.Templates.Image,0);";
$html .= "obj.setStatusProperty(\"code\", \"loading\");";
$html.="var link = new Active.Templates.Link;
link.setAttribute(\"target\",\"principal\");
link.setAttribute(\"href\",function() { return \"../page_principale.php?page=105&id_livraison=\" + this.getItemProperty(\"value\");});
obj.setColumnTemplate(link,2);
";
$html .= " document.write($name);\n";
$html .= "}\n";
$html .= "catch (error){\n";
$html .= " document.write(error.description);\n";
$html .= "}\n";
$html .="obj.setStatusProperty(\"code\", \"\");obj.refresh();";
$html .= "</"."script".">\n";
Thanks,
Greg
Greg
July 31,