Hello.
We have a problem in our soluttion with fonts and I can`t figure out what is wrong. We have more forms shown in non related tabpanels on the same page. Each form contain a HTML_AREA. The first form shows some words in bold, on which if you click, some text shows in the form below. The problem is that sometime the text in the second form appears in bold instead of regular. Could it be something related to the fact that the words on which you click is bold? And how can I repair this?
Thank you for your help,
Cristina.
When you use html and want to be sure that the font is what you want you should set the (html) font property within the text.
Hello.
Here is an example of how I use the font tag:
comm = comm.concat(‘
My text’) comm = comm.concat(record.commentary) comm = comm.concat(‘ |
The comentary shouldn`t appear in bold, but it appears like “My text”.
Do you have any idea why?
Cristina.
and what is the content of record.commentary
Hi Cristina,
Also have you tried copying the concatenated HTML block which you produce and viewing it through a browser to see whether it renders correctly there ?
Cheers
Harry
Hello.
I printed the result of comm in Servoy and saved it in a html file, and it`s correct. And the content of the record.commentary is plain text and also some ascii characters, depends on what you choose.
Cristina.
also some ascii characters
So far no idea but, what happens when you add a string instead of the record field to the html? Is that also bold?
Maybe the ascii characters interfere with the format. I know this is true for sure with ‘\n’…
Hello.
I studied the application more and now I see that theres also a newer implementation where the text it taken directly formatted from the database. I tryed to replace the text from the database with this: globals.d_commentary = ""; globals.d_commentary = globals.d_commentary.concat('<html><body><font face="Verdana" size="2">Text</font></body></html>'); and it
s displayed corectly.
Then is it possible that the problem is in the database? What should I search for: an unclose tag? I hope not.
Cristina.
Hi Cristina,
Your suggestion is one of many. It looks like there is something wrong with the content of your database. Whatever that is, and again it can be all sort of stuff, you should rule that out. Do a query in a db tool for the content of the field, maybe searching for '<b ’ or '</b ’ etc.
No fun indeed…
Hello.
We finally solved the error. The problem was that we didn`t notice that one HTML_AREA had font property set on Verdana Bold, and after that form appeared, all the other forms appeared in bold. Now we formated it correctly and the problem is gone.
Cristina.