X
Xerxes
Hi,
I have a textarea in my page and its value comes from the database.
The text in the database table contains some html tags like <br />.
However, when the page is rendered I see <br /> instead of line breaks
and view source shows "<br />". I tries to do a replace in the
js code that assigns the value to textarea but no change.
When I added a breakpoint, at the point of assignment, the value
contained < and > and not < and > Is there anything I can do to
force the html tags to be interpretted and not printed?
document.getElementById('taComments').value =
record.Comment.replace('<', '<').replace('>', '>');
"record.Comment" conatins:
This comment was added manually in the database for testing
purposes.<br />Some other text follows ....
I have a textarea in my page and its value comes from the database.
The text in the database table contains some html tags like <br />.
However, when the page is rendered I see <br /> instead of line breaks
and view source shows "<br />". I tries to do a replace in the
js code that assigns the value to textarea but no change.
When I added a breakpoint, at the point of assignment, the value
contained < and > and not < and > Is there anything I can do to
force the html tags to be interpretted and not printed?
document.getElementById('taComments').value =
record.Comment.replace('<', '<').replace('>', '>');
"record.Comment" conatins:
This comment was added manually in the database for testing
purposes.<br />Some other text follows ....