[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

[MacPerl-WebCGI] Re: [MacPerl-Forum] Dealing with the <TEXTAREA> in a form via Post / Cgi



On Thu, May 25, 2000 at 11:38:25AM +0200, Jimmy Lantz wrote:

> ----- TEXT AREA TAG -----
> <textarea name="INFO" cols="50" rows="4" wrap="PHYSICAL"></textarea>
> 
> -------- Print tag in CGI/Perl script -----------
> print qq!<PRE>$in{'INFO'}</PRE>!;
> 
> Is this the best way to go about it ? 
> I tried And now I get very long lines sometimes when the users does'nt
> push the return key and just prints a long line of text.
> Is there a way to force linebreaks but keep them if theyre already there ?

Leave off the PRE tag, and add BR tags:
s/\n/<BR>\n/g;

You'll get line breaks where the user put them, and the browser will wrap
long lines where the user didn't.

Ronald

==== Want to unsubscribe from this list?
==== Send mail with body "unsubscribe" to macperl-webcgi-request@macperl.org