cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Freek Segers <freek.seg...@nerocmediaware.nl>
Subject Re: Textarea field problem with cforms/flow
Date Tue, 13 Dec 2005 20:29:09 GMT
Hi,

I've noticed this behaviour in one of my stylesheets when I was  
trying to output elements on separate lines. I added &#13; and &#10;  
to the output and saw that the &#10; was translated as a newline but  
the &#13; appeared literally in the resulting output. When a browser  
submits form data it submits newlines as a CR (&#13;) and a LF  
(&#10;) character. With these to something similar seems to happen in  
the output;
Removing the &#13; is a quick fix, but there seems to be an odd thing  
happening with the CR characters in Cocoon.

Freek

On 13-dec-2005, at 14:12, Ard Schrijvers wrote:

> Experienced the same stupid behavior of textarea in combination  
> with CFORMS.
>
> Quick and dirty solution:
>
> <textarea id="interesses">
> 	<xsl:copy-of select="translate(xpath2yourfield-text, '&#13;', '')"/>
> </textarea>
>
> If you don't want to spend much time on it, this solution works, if  
> you do want to spend time, plz let me know if you find a decent  
> solution
>
> AS
>
>
>>
>>
>> I have data from a database that I display in a CForm and
>> allow a user to update.
>>
>> The text is displayed in the textarea of a form; when there is a
>> long string, the text simply wraps and all is fine.
>>
>> However, each time a CR is entered from the keyboard then,
>> after the data gets saved to the database, an extra CR (&#13;)
>> gets added to each existing CR as well, resulting in more and
>> more blank lines being inserted.
>>
>> How do I prevent this happening?
>>
>> Thanks
>> Derek
>>
>>
>> -- 
>> This message is subject to the CSIR's copyright, terms and
>> conditions and
>> e-mail legal notice. Views expressed herein do not
>> necessarily represent the
>> views of the CSIR.
>>
>> CSIR E-mail Legal Notice
>> http://mail.csir.co.za/CSIR_eMail_Legal_Notice.html
>>
>> CSIR Copyright, Terms and Conditions
>> http://mail.csir.co.za/CSIR_Copyright.html
>>
>> For electronic copies of the CSIR Copyright, Terms and
>> Conditions and the CSIR
>> Legal Notice send a blank message with REQUEST LEGAL in the
>> subject line to
>> HelpDesk@csir.co.za.
>>
>>
>> This message has been scanned for viruses and dangerous
>> content by MailScanner,
>> and is believed to be clean.  MailScanner thanks Transtec
>> Computers for their support.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>> For additional commands, e-mail: users-help@cocoon.apache.org
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message