Robin said:
I have a textarea in a script that displays and when the user submits
something it sends the output to the browser from the textarea, why is is
that when I press the return key within the textarea and type more text
below my carriage return does that text below the carriage not display? I
don't have any special parse code, I'm using cgi.pm.
I'm posting this so users won't get confused with textareas and cgi.
it was a problem with the script, not a problem with the textarea or the
parse code. I was basically reading the lines from a textarea into a text
file, and before the textarea I'd put a number and then a special string (to
split) and then an indentifier, post or comment, and then the textarea
contents. The problem was whenver the textarea input included a newline it
would screw up the way the file was parsed and printed later on, I finally
figured out that all I had to do was remove the newlines and replace them
with "<br>" and then remove the carriage returns and replace them with
nothing so it would be a "<br>" everytime someone inputed a newline into the
text area. The code is as follows.
$posttext = param ('posttext');
$posttext =~ s/\r/<br>/m;
$posttext =~ s/\n//m;
#and then I printed param ('posttext') - and it worked
I'm stupid.