[jQuery] $.ajax() only passes the first parameter
I'm using $.ajax() because the results include some javascript which I
need evaluated. (BTW, i'm passing it via POST)
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 }];
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.
(The JSON notation is the format described by John in response to a
bug report http://dev.jquery.com/ticket/1538. Perhaps this should be
in the documentation, too? Or updated to be more usable such as simply
[{name: value, name: value, etc. }]... but I digress)
Perhaps I'm being stupid (I'm quite good at that), because it seems
strange that such a basic function would not be working.