Opened 15 years ago
Closed 15 years ago
#1800 closed bug (worksforme)
.ajax() data param still not serializing array correctly
Reported by: | M3Mania | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | 1.2.2 |
Component: | ajax | Version: | 1.2.1 |
Keywords: | ajax param serializing array | Cc: | |
Blocked by: | Blocking: |
Description
See bug Ticket #1538, which was marked as "wontfix".
However, even using the rather awkward syntax described by John when he closed the ticket, it does not work. Only the first parameter is sent.
Using jQuery.post() works fine, but jQuery.ajax passes only the first parameter regardless of how you pass the data in. For example:
var data = [{name: "id", value: cd_id}, {name: "pronunciation_id", value: pronunciation_id }];
Perhaps I'm being stupid (I'm quite good at that), because it seems strange that such a basic function would not be working.
and
var data = 'id=' + cd_id + '&pronunciation_id=' + pronunciation_id;
Only result in id=15 (the value of 'cd_id') being passed as a post variable. Pronunciation_id is not passed at all.
Attachments (1)
Change History (3)
comment:1 Changed 15 years ago by
Component: | core → ajax |
---|
Changed 15 years ago by
Attachment: | jquery_test.html added |
---|
comment:2 Changed 15 years ago by
Resolution: | → worksforme |
---|---|
Status: | new → closed |
I tried it out in the test case and I got back what I expected. If you have a different test case that fails please reopen the bug and attach it.
test case