开发者

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:

  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/'+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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜