Jquery $.post question
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:
- "Hello, this is a test." -> OK
- "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/'+learningObjec开发者_C百科tive,$("#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?
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.
精彩评论