dloughlin

newlines in Chrome vs IE8

Discussion created by dloughlin on Mar 6, 2012
Latest reply on Mar 6, 2012 by dloughlin

Using IE8 when I enter text (with newlines using the enter key) into a textarea and using the onchange event and ajax, I submit the new text into a FMServer 11.5 database, all works well. I can view that field with FMPro, and the newlines(or carriage returns or whatever you want to call them) are preserved.

When I do the same with Chrome (and I think also IE9), the carriage returns have been dropped when the field is viewed with FMPro. Interestingly, when I view the text( with an alert dialog) that was sent with the ajax call, it has the carriage returns, and also when I echo the text that was used by the php script that used the Filemaker API (using setField), back to the javascript (the ajax response) and view that with an alert, the carriage returns are still intact.

So it appears, that the newline that is passed by Chrome to the Filemaker API, is being ignored.

an example would be, when I enter the following in the textarea element:

 

aaa

bbb

ccc

 

when viewed in the DB with FMPro it looks like what is input, but when the same is done with Chrome, it looks like the following:

 

aaabbbccc

 

If anyone can shed any light on this, it would be greatly appreciated.

 

Dennis Loughlin

Outcomes