On Sep 8, 2004, at 9:40 PM, Robert Page IV wrote:
Gunnar:
I have attached the CGI script: weekly.pl. The subroutine save_weekly()
captures the 'executive summary' and 'details' values entered into the textarea via
$summary = param('executive summary') and $details = param('details').
For Debug purposes, I print $summary and $detail. I may make this a review
feature. Anyway, none of the text displays without any carriage returns.
I am beginning to suspect this is due to HTML not recognizing these
characters in the variables. Hmmmm.
<weekly.pl>
Robert Page
Try this:
$details = param('details'); $details =~ s/\r/<br />/g;
If you view source on the returned page now, you should see that there are carriage returns in the source code where they were input in your <textarea>. But, of course, HTML is (browser bugs notwithstanding) white space agnostic, so they're not being displayed. You could use a <pre>, but then you loose soft wrapping and many other formatting niceties.
So, the easy answer is to substitute <br /> for your carriage returns.
Chad A Gard http://www.percussionadvocates.com/chad
-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>