Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Please help in innerHTML for newline character

Please help in innerHTML for newline character

Scheduled Pinned Locked Moved ASP.NET
helpdatabase
4 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • V Offline
    V Offline
    varshavmane
    wrote on last edited by
    #1

    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

    D 1 Reply Last reply
    0
    • V varshavmane

      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

      D Offline
      D Offline
      dwatkins dirq net
      wrote on last edited by
      #2

      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?

      Dirk Watkins

      V 1 Reply Last reply
      0
      • D dwatkins dirq net

        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?

        Dirk Watkins

        V Offline
        V Offline
        varshavmane
        wrote on last edited by
        #3

        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...

        D 1 Reply Last reply
        0
        • V varshavmane

          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...

          D Offline
          D Offline
          dwatkins dirq net
          wrote on last edited by
          #4

          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/

          Dirk Watkins

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups