views:

650

answers:

1

I've got a problem with textarea's in Google Chrome. I'm using classic ASP, but this is unimportant as Chrome is actually posting the data incorrectly.

The problem is with a text area. As soon as a string of text is too long to fit one line of the text area, it wraps to the next line (as it should).

My problem is that when submitted, the form data contains a CarriageReturn & LineFeed at every spot where the text wrapped, as well as user generated enter/return events - I can't even tell the difference between the two.

Does anyone know how to fix this? Possibly an option in the text area or something? All other browsers only add CarriageReturns and LineFeeds where the end user has actually put them in.

+1  A: 

This should only happen if you set the wrap="hard" attribute on the textarea.

Do you have wrap="hard" set on the textarea ? If so, remove it. If not, can you try setting wrap="soft" as attribute?

Philippe Leybaert
Excellent. Wrap soft works!I was actually using wrap="physical" which is not cross browser supported. As soon as I changed it to wrap="soft" it's sorted!
John
It's better to just leave out the attribute. The default is "soft"
Philippe Leybaert