Textarea input truncates paste from notepad after 1st carriage return in IE

I have a textarea input field on a form where users can either type content manually or paste in lists from notepad or columns or rows in a spreadsheet.  In Firefox, it works perfectly, in IE7 and 8 the pasted information is truncated after the first carriage return if the source is columnar - it works properly if it is all on one line or in one row.

An example would be as follows.

If you copy the content of a Notepad file
Line1
Line2
Line3
...
and paste it into the filed in Firefox, you get
Line1 Line2 Line3 ....     which then processes properly

If you paste the same content into IE, your get
Line1

and nothing more.

I need to find a way to accommodate columnar content from Notepad and spreadsheets in both environments (and Safari as well, although i haven't tested it there yet) since users will be deriving lists from a variety of sources and using notepad or a spreadsheet as a pre-processor to get the list items into the textarea.
The only Javascript on the page checks that the field isn't empty onsubmit.
The code snippet uses style to format the textarea, but I have tried rows and columns with no effect.
<td><div align="left">
                 <input name="long" type="textarea" id="long" style="width: 500px; height: 60px" value="" class="field2"/>
              </div></td>

Open in new window

llakowAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Ray PaseurCommented:
Consider using TinyMCE for your textarea processor.  It is not perfect, but it can handle this situation pretty well.

http://tinymce.moxiecode.com/

HTH, ~Ray
0
llakowAuthor Commented:
Ray
Looks like a great tool, but unless I am missing something, it will impose another level of technophobe / computer interaction on the intended user base.
The users are generating lists of stock symbols they wish to track from a variety of sources that will allow them to create either csv or txt files as downloads.  I need to find a way for them to simply open the file with the appropriate program (a spreadsheet for csv and Notepad for txt, select all, copy and then paste into the text box.
Trying to get most of them to learn additional controls for each textarea they need to input will discourage many from using the system.
0
llakowAuthor Commented:
It occurs to me that a javascript function using onchange to trigger a parser to strip the offending non printing characters from the input, replacing them with spaces, might be a possible solution, but finding and replacing nonprinting characters in a string is beyond my limited javascript skills.
0
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

IanThCommented:
paste your code here as we'll need to see the javascript to sort out that for you
or a url to the site so we can view source
0
llakowAuthor Commented:
Hmmm...Paste which code here?
Right now, the only code is the input textarea code listed in the initial question.
The javascript checkFields function I referred to is unrelated to this issue - it just checks that the required input fields aren't null when the form is submitted.
If you want to view the page on the actual site, you'll need to register at symbolsifter.com, login, select track stocks, and then create a list.
The code is about as basic as you can get - a simple html input form.
Do it in Firefox and it works perfectly.  Do it in IE and all you get is the first line
WFLong.txt
0
IanThCommented:
I use spry text area's as I use cs4 and they work fine so if your using cs4 use a spry textarea
0
llakowAuthor Commented:
I'm not using cs4 - but I am curious what attributes cs4 can add to a textarea input field on a form so that a browser will treat it differently?
0
llakowAuthor Commented:
The problem was so simple it escaped everyone's notice.
I had designated it as in <input field, type=textarea ...instead of making it a <textarea...></textyarea>
Changed the tag, problem solved.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
PHP

From novice to tech pro — start learning today.