Search This Blog

Wednesday, March 17, 2010

Not all parameters get sent in jquery ajax call

Programmer Question

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!



Find the answer here

No comments:

Post a Comment

Related Posts with Thumbnails