Please help in innerHTML for newline character
-
Hi All, I am developing Rich Text Editor and I am have to save the text in DB, the problem I am facing is with bullet list or ordered list. Actually when newline comes it replaces the newline with some kind of box and in DB it saves all the contents which is before that box. I need to save the whole text with newline and retrive the same text with newline. Please help me... Thanks in advance
-
Hi All, I am developing Rich Text Editor and I am have to save the text in DB, the problem I am facing is with bullet list or ordered list. Actually when newline comes it replaces the newline with some kind of box and in DB it saves all the contents which is before that box. I need to save the whole text with newline and retrive the same text with newline. Please help me... Thanks in advance
You need to escape the unprintable character with a slash: newline is
\n
return is\r
Not sure if this will help. Can you give more information if it doesn't? -
You need to escape the unprintable character with a slash: newline is
\n
return is\r
Not sure if this will help. Can you give more information if it doesn't?Thanks for the reply I got the solution but now I am facing different problem. I need to show the text on page load where text is fetched from DB. I know I have to use Jaavscript but not getting the syntax. Please help... Thanks in advance...
-
Thanks for the reply I got the solution but now I am facing different problem. I need to show the text on page load where text is fetched from DB. I know I have to use Jaavscript but not getting the syntax. Please help... Thanks in advance...
You're using Javascript to get the information from a database? So you're using AJAX? In either case (using AJAX or not) you need to have a server side page that will return the results. If you want to show the results with Javascript the server side db connection page will need to display the db resultset in a way that Javascript can read: either in XML or JSON or something else. JSON works really well and is bandwidth conservative: json.com/