Skip to main content

Bug Tracker

Side navigation

#1800 closed bug (worksforme)

Opened October 14, 2007 04:06PM UTC

Closed December 06, 2007 03:04AM UTC

.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)
  • jquery_test.html (0.8 KB) - added by davidserduke December 06, 2007 03:03AM UTC.

    test case

Change History (2)

Changed October 18, 2007 12:14AM UTC by john comment:1

component: coreajax

Changed December 06, 2007 03:04AM UTC by davidserduke comment:2

resolution: → worksforme
status: newclosed

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.