I've probably done the hardest part of my spec but mind's boggled by something very strange. I'll explain:
I have a simple cfm page with a div and a textarea, plus AJAX code. The idea is when a user type something into the text area and presses 'add' it does so through AJAX, and then displays the results in the div's innerhtml.
All this works fine.
The problem is when i update div with a new note, i want to add some HTML (<br> & <font>) around parts of the text.
This gets updated to the database fine but when i get it back and display it in the div, it displays it with all the HTML tags around it! ie: <br> will be displayed as <br> not an actual line break!
The weird thing is, when i run this on my machine at home, using 'longtext' data type in MYSQL it works fine. But when i run it at work, storing the data in a 'ntext' field on MSSQL, it displays the HTML code!
Please can some one tell me how to ensure the HTML returned from the db is displayed as HTML?
When i put <pre> tags around it, it just displays as pure text!
Do i need to encode/decode? serialize/deserialize?
Please give code as examples and tell me hy it would work at hme but not work?
Thanks a million!