TextArea formatting issue

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

    TextArea formatting issue

    I have a textarea that is populated from a blob within a database.
    Everytime the data is pulled, however, there is always a lot of leading
    space characters before the actual text. It is not in the database
    this way, so how might I specify more formatting parameters within the
    textarea?

    Matt Williams

  • WindAndWaves

    #2
    Re: TextArea formatting issue


    "Matt" <mdwilliam@radf ord.edu> wrote in message
    news:1105949241 .762366.56980@c 13g2000cwb.goog legroups.com...[color=blue]
    > I have a textarea that is populated from a blob within a database.
    > Everytime the data is pulled, however, there is always a lot of leading
    > space characters before the actual text. It is not in the database
    > this way, so how might I specify more formatting parameters within the
    > textarea?
    >
    > Matt Williams
    >[/color]

    What I found was that I had a statement like....

    echo ' blab blaob
    '.$mytext.'
    and so on'

    and that spaces were added because of the line and perhaps also the
    'invisible' extra space in the document on those lines after the code.

    I changed it to

    echo 'bla bla '.$mytext.' bla bla'

    and this helped - but I am only a novice novice, so dont take it too
    serious.


    Comment

    • Matt

      #3
      Re: TextArea formatting issue

      This would be my first suspicsion as well, but I entered my sample data
      in the database by hand for testing purposes....... it has no extra
      space appended to either sid of the text. I will try and draw what is
      happening to my data
      _______________ _______________ _________
      | blahblahblahbla hb | ^ |
      |lahblahblahbla hblahb | v |
      ----------------------------------------

      Comment

      • News Me

        #4
        Re: TextArea formatting issue

        Matt wrote:[color=blue]
        > This would be my first suspicsion as well, but I entered my sample data
        > in the database by hand for testing purposes....... it has no extra
        > space appended to either sid of the text. I will try and draw what is
        > happening to my data
        > _______________ _______________ _________
        > | blahblahblahbla hb | ^ |
        > |lahblahblahbla hblahb | v |
        > ----------------------------------------
        >[/color]

        So where is the PHP code that you suspect is causing a problem?

        NM

        --
        convert uppercase WORDS to single keystrokes to reply

        Comment

        • Rutger Claes

          #5
          Re: TextArea formatting issue

          Matt wrote:
          [color=blue]
          > I have a textarea that is populated from a blob within a database.
          > Everytime the data is pulled, however, there is always a lot of leading
          > space characters before the actual text. It is not in the database
          > this way, so how might I specify more formatting parameters within the
          > textarea?
          >
          > Matt Williams[/color]
          Make shure you put your text in the textarea as follows:
          <textarea><?p hp print $content; ?></textarea>

          and not
            <textarea>
             <?php
              print $content;
             ?>
            </textarea>

          The second will produce spaces in front and at the end of $content;
          --
          Rutger Claes rgc@rgc.tld
          Replace tld with top level domain of belgium to contact me pgp:0x3B7D6BD6
          Do not reply to the from address. It's read by /dev/null and sa-learn only

          Comment

          • porneL

            #6
            Re: TextArea formatting issue

            [color=blue]
            > Make shure you put your text in the textarea as follows:
            > <textarea><?p hp print $content; ?></textarea>
            >
            > and not
            >   <textarea>
            >    <?php
            >     print $content;
            >    ?>
            >   </textarea>
            >
            > The second will produce spaces in front and at the end of $content;[/color]

            Not entirely, whitespace after ?> is removed.

            and it should be:
            echo htmlspecialchar s($content);

            to avoid problems with <> chars in text.

            --
            * html {redirect-to: url(http://browsehappy.pl) ;}

            Comment

            • Matt

              #7
              Re: TextArea formatting issue

              Excellent!!! This fixed the last my problems within this app. I put
              the statements inline and everything looks perfectly formatted.....
              Thanks

              Matt Williams

              Comment

              Working...