Bold only part of text field populated by JavaScript?
I am using a drop-down box to populate a text field, as in this example. It works fine, but I am having trouble formatting the output. I need to bold only a portion of the text. I don't know very much about scripting, so I am stuck. I tried to connect two strings together, with the JavaScript method for bold text on the second string, like so:
TextField1.rawValue = "Some plain text!\n" + "Some bold text!".bold();
Both strings show up, but instead of the second being bold, it just outputs the HTML tags for bold, so in my text field I get this:
Some plain text!
<b>Some bold text!</b>
The text field format is set to rich text and the data format is set to xhtml since users also have the ability to add their own answers to the text field as well. However, I don't want them to have to select and bold text that is automatically sent to the text field by the drop-down list. It kind of defeats the purpose of automating it in the first place if they have to go back and adjust it every time...
Is there something I'm missing? Or another, better way to do this? Any help is greatly appreciated.