I am trying to post data to the action method in the postData section in jqGrid like this, but get an error, any ideas?
postData: { species: function()
{
return JSON.stringify($("form"));
},
I can tell you that this format below does work but it is not JSON:
postData: { species: $("form").serialize() },
Probably you should use jQuery.serializeArray instead of jQuery.serialize:
See also the answer for some more version of data conversion of the data returned from
$("form").serializeArray()before calling ofJSON.stringify.