-
31 Jul 2012 5:29 AM #1
Textarea carriage return line feed
Textarea carriage return line feed
I have a form that includes a text area
When I retrieve the data from the textarea in javascript:Code:{xtype: 'textarea', id: 'queryTerms', fieldLabel: 'Query Terms', width: 200, height: 200, labelStyle: ''width: 120px;', stateful: true}
I get multiple lines including carriage return /n and line feed /rCode:var queryTerms = document.getelementById("queryTerms").value
When I try to get the same value using the Form in Struts, I only get the first line of data
Any suggestions ?
Tony Mariella
Raytheon Company
-
31 Jul 2012 9:38 PM #2
What do you see if you use getValue()?
Scott.
-
1 Aug 2012 5:46 AM #3
I see the same values using getValue()
In javacsript, I can see all carriage returns and data.Code:var queryTerms = Ext.getCmp("queryTerms").getValue() or var queryTerms = document.getelementById("queryTerms").value
In struts, I get the data from the request. I only see the first line of data in the request, anything after the carriage return doesn't come through.
-
1 Aug 2012 7:30 AM #4
Are you encoding the string?
Scott.
-
1 Aug 2012 7:44 AM #5


Reply With Quote