views:

48

answers:

1

I have a form with a text field, that I want to submit using post (Jquery).

I am using Java/Spring and Tomcat6 on the server side.

Here comes the problem:

The text is submitted correctly, unless there is a '.' in it. In that case the text is being truncated (everything after the '.' is ignored.

Example:

  1. "Hello, this is a test." -> OK
  2. "Hello. This is a test." -> failure

Sentence number 2 will be "Hello" after the post.

this is the code I am using to post:

$.post('/Forge/units/'+unitCode+'/addlo/'+learningObjective,$("#searchForm").serialize(),
                    function(data){
                    }
            );

I also tried without serializing the form:

$.post('/Forge/units/'+unitCode+'/addlo/'+learningObjective,
                  function(data){
                  }
          );

Does anyone have any idea about what may be causing this problem?

+1  A: 

I highly recommend using the jQuery Form Plugin for doing AJAX form posting.

Has a lot of useful functions as well as the ajax form posting.

Alastair Pitts