:: Forum >>

How to dynamically change font color on a hyperlink?

Hi All,

I read trough the forum but could not find an answer for this. I did set up the css properties for the link in my css file like this:

"
a:link{
color: coral;
}
a:visited{
color: yellow;
}
a:hover{
color: red;
}
"
Then I have a function that should change the font color based on a value from a cell
"
activeGrid.defineRowProperty("fontColor", function(row){
return this.getCellValue(3, row)=='S' ? "white" : "#003399";
});
for(var i=0;i<activeGrid.getRowCount();i++){
activeGrid.getRowTemplate(i).setStyle("color", function(){return this.getRowProperty("fontColor");});
activeGrid.getRowTemplate(i).getCellTemplate(0, i).setStyle("color", function(){return this.getRowProperty("fontColor");});
}
"
Could please someone tell me what I am doing wrong?

Thanks!
Adriana Viman
Thursday, July 20, 2006
Alex,
Could you please let me know if it is posible?
Thanks
Adriana Viman
Friday, July 21, 2006

This topic is archived.


Back to support forum

Forum search