html tag calculation

Hi
Any chance you can help with this one?
Jan recently showed us how to use a calculation to add html tags either side of a shippet of html content stored in a database, so that we can display the html in a servoy client.

But I don’t seem to be getting the code right?

return “”%htmltext%“”;

“htmltext” is the name of our column containing the html code with out html tags. Eg:

Test content

The problem seems to be that the “htmltext” does not concatonate..
All that displays in the client is: NaN

I’ve tried
return “”%htmltext%“”;
return “”%%htmltext%%“”;
And many more variations.. Can you see where we are going wrong?

Many thanks
Eugene

try this:

return “” + htmltext + “”;

also look in de CRM demo, You see a lot of examples there!

Eugene, you should set it to:

return "<html>%%htmltext%%</html>"; 

your column should hold the tags in the following format:

"<h1 class='style2'>Test content </h1>"
```.

You have to use hanging comma's within the string to get it right.

Remember to tick the displayTags property of the column that shows the html.

[/code]

many thanks guys

return “” + htmltext + “”;
did the trick…

:D

do you know if this method is the best one to use to mail merge into the parth of an image in order to construct a url from different parts of a database?

I don’t understand your question completely. What are you trying to archieve…

thanks Marcel..
this is more of less what i meant
return “<img src='URL.com - MediaOptions”+ id + “/photo1.jpg’”;

this seems to work but is probably not the best way to do it..? :roll:
thanks
eugene

Well, it is a very fine way if you want to show that image depending on the content of the current record (or whatever)…