Modify ↓
Ticket #6273 (closed bug: worksforme)
.getJSON does not work for extra params. (?undefined=undefined)
| Reported by: | jq_johan | Owned by: | |
|---|---|---|---|
| Priority: | low | Milestone: | 1.4.3 |
| Component: | ajax | Version: | 1.4.2 |
| Keywords: | Cc: | ||
| Blocking: | Blocked by: |
Description
<!DOCTYPE HTML PUBLIC "-W3CDTD HTML 4.01 TransitionalEN"> <html>
<head>
<script type="text/javascript" src="jquery-1.4.2.js"></script>
</head> <body>
<script type="text/javascript">
var aoData = new Array(); aoData.push({a:"1"}); $.getJSON( "jsonpage.html", aoData, function (json) {});
</script>
</body>
</html>
The string sent to the server is:
http://localhost/jqueryjsontest/jsonpage.html?undefined=undefined
The parameters are sent as undefined.
Change History
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.
Note: See
TracTickets for help on using
tickets.

I've recreated your test case on my server and was able to receive a response from the server-side file being called by JSON without any issues. This was confirmed as including the undefined=undefined parameter at the end of the URL called.
Please remember that the file you're calling and expecting a JSON response from needs to both be in valid JSON format but also needs to be sending back valid content-type information in the header if you're using something like PHP.
eg. header('Content-type: application/json')
If you are able to provide the contents of your jsonpage.html file for further review please feel free to submit a new ticket.