HTML/CSS in Table Calculation

The following code in a table calculation works:

return '<html><p color="red"><b>' + column_name + '</b></p></html>'

but, the following code does not work:

return '<html><p style="color: red; font-weight: bold">' + column_name + '</p></html>'

Why?

The second line is the preferred method for coding HTML as it uses the newer CSS formatting convention.

Hi, I think, the calculation has nothing todo with it, but the way it is rendered right?
are you using this in a Servoy smartclient? and in a html-area?

the last one, is a java component, that is very limited…

Hi Kim,

I tested out your code and it all works fine for me with a label. Using a calculation or putting the html straight into the label. Both work.
What version of Servoy and Java are you using ? And like Harjo already asked in what client are you using this?

Harjo and Robert,

I revisited the problem today, and now the code works!

I didn’t change the code but had to re-boot the computer due to upgrades; one of the upgrades was to JRE build 1.6.0_22-b04. I’m not saying that there was a problem with the JRE, but that re-booting the computer may have cleared some other problem. Go figure.

Thanks for your responses. I look forward to seeing you both in Amsterdam for Servoy World.