Not all parameters get sent in jquery ajax call

Posted by rksprst on Stack Overflow See other posts from Stack Overflow or by rksprst
Published on 2010-03-17T05:31:38Z Indexed on 2010/03/17 5:51 UTC
Read the original article Hit count: 377

Filed under:
|
|
|
|

I have a strange error where my jquery ajax request doesn't submit all the parameters.

$.ajax({
    url: "/ajax/doAssignTask",
    type: 'GET',
    contentType: "application/json",
    data: { 
        "just_a_task": just_a_task,
        "fb_post_date": fb_post_date,
        "task_fb_postId": task_fb_postId,
        "sedia_task_guid": sedia_task_guid,
        "itemGuid": itemGuid,
        "itemType": itemType,
        "taskName": taskName,
        "assignedToUserGuid": assignedToUserGuid,
        "taskDescription": taskDescription
    },
    success: function(data, status) {
        //success code
    },
    error: function(xhr, desc, err) {
        //error code
    }
});

But using firebug (and debugging) I can see that only these variables are posted:

assignedToUserGuid
itemGuid
itemType
just_a_task
taskDescription 
taskName

It's missing fb_post_date, task_fb_postId, and sedia_task_guid

I have no idea what would cause it to post only some items and not others? Anyone know?

Data is sent to asp.net controller that returns jsonresult (hence the contentType)

Any help is appreciated. Thanks!

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about AJAX