Here is the scenario:

I have a TextArea on my page that displays a couple of paragraphs
pulled from the database for editing.  When the form is submitted the
TextArea contents are checked to see if  any changes have been made.

Here is the Java code to test for changes:

if (newFormText.equals(originalDBText))
   formChanged = false;


This works fine for Firefox but fails on IE.

I had a hunch it was the returns between the paragraphs so I URL-
encoded the text to see.

Original text from db: paragraph%0D%0A%0D%0Aparagraph

IE sends back this: paragraph%0A%0Aparagraph

while FF sends back: paragraph%0D%0A%0D%0Aparagraph

The classic Unix/DOS carriage return / line feed problem.

So even if the text is unchanged by the user the browser may sent back
different text.

I may be missing something obvious, but I would have thought this
would be something GWT or Javascript took care of automatically.

Is there a quick fix / best practice / alternative method available?


-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.


Reply via email to