Author Topic: Textarea problem  (Read 104 times)

0 Members and 1 Guest are viewing this topic.

Offline geroidTopic starter

  • Enthusiast
    • View Profile
Textarea problem
« on: July 03, 2009, 06:56:52 AM »
Hi
I retrieve a record from a table and display it in a html textarea. The problem is that it is not displaying the text correctly. When it appears in the textarea it looks like this:

      Author Gabriel Rosenstock will be in
Byrne’s World of
Wonder in the Fairgreen Shopping Centre
reading for primary
school children.

As you can see, the text is tabbed at the beginning and sentences are forced onto the next line. I want the whole thing to display as normal text would (without this tab and line break). The text area code looks like this
<textarea cols="40" rows="12" wrap="hard" name="contentirish">
      </textarea>

Any ideas

Offline backie

  • Irregular
    • View Profile
Re: Textarea problem
« Reply #1 on: July 03, 2009, 07:29:01 AM »
Instead of having wrap="hard" use wrap="off" and try and have the closing tag right next to the open as any space results in content to the textarea.

Offline runnerjp

  • Addict
    • View Profile
Re: Textarea problem
« Reply #2 on: July 03, 2009, 07:39:25 AM »
try doing it like this

<textarea cols="40" rows="12" wrap="hard" name="contentirish"></textarea>

i hd this problem where there was a space within the textarea code and it just added it to the text

Offline geroidTopic starter

  • Enthusiast
    • View Profile
Re: Textarea problem
« Reply #3 on: July 03, 2009, 07:45:32 AM »
Thanks backie
That worked perfectly

Offline geroidTopic starter

  • Enthusiast
    • View Profile
Re: Textarea problem
« Reply #4 on: July 03, 2009, 07:46:56 AM »
Thanks to everyone for replies. It was simple that space problem between the textarea tags. Sorted now

PHP Freaks Forums

« on: »

Tired of these ads? Purchase a supporter subscription to get rid of them.