IF you are using CGI then you can use any of the option for <textarea> ...
</textarea> for example:
<snip>
 $q->textarea(-wrap=>virtual, ...
</snip>

I have called the above method with all of the following and they do what I
want (expect, as per what an HTML doc says ...)

"wrap=off|virtual|physical where:
off => turns word wrapping off; user must enter their own line returns
virtual => displays the wrap, but the line ending are not transmitted to the
server
physical => displays and transmits line endings to the server "

In general any attributes your browser uses CAN BE included in the CGI
method call ... it doesn't care  ...

"If you provide a parameter that the method doesn't recognize, it will
usually do something useful with it, such as incorporating it into the HTML
tag as an attribute. For example if Netscape decides next week to add a new
JUSTIFICATION parameter to the text field tags, you can start using the
feature without waiting for a new version of CGI.pm: "

Hope this gives you some ideas...

jwm
-----Original Message-----
From: SHEIKH Sajjad [mailto:[EMAIL PROTECTED]
Sent: February 02, 2004 01:58
To: [EMAIL PROTECTED]
Subject: RE: Return carridge


What if I use the following?

# replacing carridge return with carridge return
$in[$i] =~ s/\r/\r/g;

But it does not work!

-----Original Message-----
From: Brian Raven [mailto:[EMAIL PROTECTED] 
Sent: 30 January 2004 14:39
To: [EMAIL PROTECTED]
Subject: RE: Return carridge


SHEIKH Sajjad wrote:
> 
> Hi all,
> 
> When I parse the form data from 'textarea', I lose the return
> carridge.
> 
> 
> For example
> Line1:        street 15
> Line2         block 1
> 
> How can I preserve the return caridge in the following script
> 
> sub ReadParse {
>   local (*in) = @_ if @_;
>   local ($i, $key, $val);
> 
>   if ( $ENV{'REQUEST_METHOD'} eq "GET" ) { # replaced his MethGet
>     function $in = $ENV{'QUERY_STRING'};
>   } elsif ($ENV{'REQUEST_METHOD'} eq "POST") {
>     read(STDIN,$in,$ENV{'CONTENT_LENGTH'});
>   }
> 
>   @in = split(/&/,$in);
> 
>   foreach $i (0 .. $#in) {
>     # Convert plus's to spaces
>     $in[$i] =~ s/\+/ /g;
> 
>     # Split into key and value.
>     ($key, $val) = split(/=/,$in[$i],2); # splits on the first =.
> 
>     # Convert %XX from hex numbers to alphanumeric
>     $key =~ s/%(..)/pack("c",hex($1))/ge;
>     $val =~ s/%(..)/pack("c",hex($1))/ge;
> 
>     # Associate key and value
>     $in{$key} .= "\0" if (defined($in{$key})); # \0 is the multiple
>     separator $in{$key} .= $val;
>   }
>   return length($in);
> }

I strongy recommend that you start by getting rid of the above code and
"use CGI" instead.

HTH

-- 
Brian Raven


-----------------------------------------------------------------------
The information contained in this e-mail is confidential and solely 
for the intended addressee(s). Unauthorised reproduction, disclosure, 
modification, and/or distribution of this email may be unlawful. If you 
have received this email in error, please notify the sender immediately 
and delete it from your system. The views expressed in this message 
do not necessarily reflect those of LIFFE Holdings Plc or any of its
subsidiary companies.
-----------------------------------------------------------------------


_______________________________________________
ActivePerl mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

______________________________________________________________
This message has been scanned for all viruses by BTnet VirusScreen. The
service is delivered in partnership with MessageLabs.

This service does not scan any password protected or encrypted
attachments.  

If you are interested in finding out more about the service, please
visit our website at
http://www.btignite.com/internetservices/btnet/products_virusscreen.htm
==============================================================

_______________________________________________
ActivePerl mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
_______________________________________________
ActivePerl mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to