#8798 closed bug (duplicate)
jQuery appends some weird string on the data sending to server
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | undecided | Milestone: | 1.next |
Component: | data | Version: | 1.5.2 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
StackOverflow discussion: http://stackoverflow.com/questions/5578754/jquery-append-some-weird-string-into-the-data-submitted
Code to reproduce the bug (Put the following code in the html page and read the data submitted in Fiddler. jQuery 1.4.2 works fine, the problem happens in 1.5.1 and 1.5.2).
<html> <head> <script src="https://github.com/douglascrockford/JSON-js/raw/master/json2.js"></script> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js"></script> <script> var data = { "Name": "test??", "testDesc": "testdesc??"};
$.ajax({
url: "submit.aspx/SubmitData", data: JSON.stringify(data), type: "POST", contentType: "application/json; charset=utf-8", dataType: "json", cache: false
}).success(function (msg) {});
</script> </head> <body></body> </html>
With the above code, the data sending to the server is { "Name": "testjQuery15103933552800185728_1302170988810", "testDesc": "testdesc??"}
Change History (4)
comment:1 Changed 12 years ago by
comment:2 Changed 12 years ago by
Resolution: | → duplicate |
---|---|
Status: | new → closed |
comment:4 Changed 12 years ago by
Component: | unfiled → data |
---|
The jsFiddle link: http://jsfiddle.net/uTq4n/