Bug Tracker

Modify

Ticket #8798 (closed bug: duplicate)

Opened 2 years ago

Last modified 2 years ago

jQuery appends some weird string on the data sending to server

Reported by: neodeep2001@… Owned by:
Priority: undecided Milestone: 1.next
Component: data Version: 1.5.2
Keywords: Cc:
Blocking: Blocked by:

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

comment:1 Changed 2 years ago by anonymous

The jsFiddle link:  http://jsfiddle.net/uTq4n/

comment:2 Changed 2 years ago by ajpiano

  • Status changed from new to closed
  • Resolution set to duplicate

comment:3 Changed 2 years ago by ajpiano

Duplicate of #8417.

comment:4 Changed 2 years ago by rwaldron

  • Component changed from unfiled to data

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.