How do you set the textarea tag to where when the sentence becomes too long for the textarea, it automatically starts typing on a new line? (Like the textarea I'm typing in to make this post.)
Last edited by Joseph Witchard; 11-04-2008 at 04:56 AM..
you can use html attributes: wrap="soft" wrap="hard" wrap="off"
hard: wraps text and includes the carriage returns in the textarea value
soft: wraps text but doesn't add carriage returns
off: obviously, no word wrapping
you'll probably want to use soft
it's odd though, iirc most browsers default to textarea word wrapping
Last edited by itsallkizza; 11-04-2008 at 04:18 AM..
Is there anything else that can be done? Even using the wrap attribute, it still doesn't work in either Firefox or Opera. Only Internet Explorer I even looked up the attribute values for IE browsers and tried them instead. Nothing.
Got it working. Thanks Just out of curiosity (I think I know what the answer will be), there doesn't happen to be any W3C standard way of doing this, is there?
Dang, I was hoping no one would ask It was just a stupid error on my part. When I was testing the textarea by typing in it, I just held down a key and watched whatever character I selected type as long as it could across the textarea. Then, when I was posting here, I did the same thing (I don't remember why I did so), but I saw that it did the same thing here, too. I didn't know that you had to actually be typing out words and such to get the text to wrap in the textarea. Sorry for any inconvenience I caused you guys