textarea curiousity

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Sheldon Glickler

    textarea curiousity

    I use Dreamweaver as my development IDE.

    When I create a textarea, put stuff in, save it to the database, and recall
    it to the textarea later, it alway comes up with what looks like a large tab
    spacing in the beginning. If I save it back, it comes back the same way.
    If I delete the leading stuff and save it again, it still comes back exactly
    the same.

    This is only for the first paragraph so I suspect there are some leading
    characters that I don't know about. How can I get it to display starting at
    the left edge?

    Shelly


  • strawberry

    #2
    Re: textarea curiousity


    Sheldon Glickler wrote:
    I use Dreamweaver as my development IDE.
    >
    When I create a textarea, put stuff in, save it to the database, and recall
    it to the textarea later, it alway comes up with what looks like a large tab
    spacing in the beginning. If I save it back, it comes back the same way.
    If I delete the leading stuff and save it again, it still comes back exactly
    the same.
    >
    This is only for the first paragraph so I suspect there are some leading
    characters that I don't know about. How can I get it to display starting at
    the left edge?
    >
    Shelly
    Not sure. I've seen this problem before though - and on those occasions
    the culprit has been blank space or carriage returns in the html. Have
    a look at the source code and see if there are any obvious spaces that
    might produce this error.

    Comment

    • Rik

      #3
      Re: textarea curiousity

      strawberry wrote:
      Sheldon Glickler wrote:
      >I use Dreamweaver as my development IDE.
      >>
      >When I create a textarea, put stuff in, save it to the database, and
      >recall it to the textarea later, it alway comes up with what looks
      >like a large tab spacing in the beginning. If I save it back, it
      >comes back the same way. If I delete the leading stuff and save it
      >again, it still comes back exactly the same.
      >>
      >This is only for the first paragraph so I suspect there are some
      >leading characters that I don't know about. How can I get it to
      >display starting at the left edge?
      >>
      >Shelly
      >
      Not sure. I've seen this problem before though - and on those
      occasions
      the culprit has been blank space or carriage returns in the html. Have
      a look at the source code and see if there are any obvious spaces that
      might produce this error.
      Yup, when you try to format your HTML code nicely using:
      echo "<textarea>
      {$content}
      </texteare>";
      (or echo "<textarea>\n\t {$content}\n</textarea>";),
      the whitespace will be saved.

      Try echo "<textarea>{$co ntent}</textarea>";
      And check the source indeed.

      Grtz.
      --
      Rik Wasmus


      Comment

      • Sheldon Glickler

        #4
        Re: textarea curiousity

        I ran another little test. I bypassed the database and simply sent the text
        as an argument and retrieved it with $_GET. I also echoed the first three
        characters. Here are the results:

        1 - The cursor is initially positioned at column 3.
        2 - If I backspace to column one and put in text, then the first three
        characters match the text I put in. The cursor is positioned initially at
        column three.
        3 - If I don't backspace, the first two characters become blanks
        (non-printable) and the display starts at column 5

        Shelly

        "Sheldon Glickler" <sheldonlg@as ap-consult.comwrot e in message
        news:MYNug.21$1 Z5.20@twister.n yroc.rr.com...
        >I use Dreamweaver as my development IDE.
        >
        When I create a textarea, put stuff in, save it to the database, and
        recall it to the textarea later, it alway comes up with what looks like a
        large tab spacing in the beginning. If I save it back, it comes back the
        same way. If I delete the leading stuff and save it again, it still comes
        back exactly the same.
        >
        This is only for the first paragraph so I suspect there are some leading
        characters that I don't know about. How can I get it to display starting
        at the left edge?
        >
        Shelly
        >

        Comment

        • Sheldon Glickler

          #5
          Re: textarea curiousity

          Yup. That was it. I put them all in-line and it is OK.

          This is something that bugged me before and when I ran into it again, I
          thought I'd ask.

          Thanks.

          Shelly

          "Rik" <luiheidsgoeroe @hotmail.comwro te in message
          news:79065$44bb b17a$8259c69c$2 2151@news1.tude lft.nl...
          strawberry wrote:
          >Sheldon Glickler wrote:
          >>I use Dreamweaver as my development IDE.
          >>>
          >>When I create a textarea, put stuff in, save it to the database, and
          >>recall it to the textarea later, it alway comes up with what looks
          >>like a large tab spacing in the beginning. If I save it back, it
          >>comes back the same way. If I delete the leading stuff and save it
          >>again, it still comes back exactly the same.
          >>>
          >>This is only for the first paragraph so I suspect there are some
          >>leading characters that I don't know about. How can I get it to
          >>display starting at the left edge?
          >>>
          >>Shelly
          >>
          >Not sure. I've seen this problem before though - and on those
          >occasions
          >the culprit has been blank space or carriage returns in the html. Have
          >a look at the source code and see if there are any obvious spaces that
          >might produce this error.
          >
          Yup, when you try to format your HTML code nicely using:
          echo "<textarea>
          {$content}
          </texteare>";
          (or echo "<textarea>\n\t {$content}\n</textarea>";),
          the whitespace will be saved.
          >
          Try echo "<textarea>{$co ntent}</textarea>";
          And check the source indeed.
          >
          Grtz.
          --
          Rik Wasmus
          >
          >

          Comment

          Working...