php - Sending additional variable to server with dataUrl -
this should simple fix, have not been able find it.
i using both postdata , editdata post variable server form editing. variable used in switch select appropriate function. this php contains of functions project. want avoid having many different php pages.
so of fine, cannot find way same thing dataurl. 1 lead i've been able find using ajaxselectoptions, info option. if appropriate way go this, way utilize it? this?:
ajaxselectoptions:{ contenttype: "application/json", datatype:'json', type:'post', action: function(){ homecoming 'popcodeadjust'; } }
in general can utilize data
property of ajaxselectoptions
. code cam
ajaxselectoptions: { type: "post", data: { action: "popcodeadjust"; } }
or
ajaxselectoptions: { type: "post", data: { action: function () { homecoming "popcodeadjust"; } } }
see here or here.
the problem can if need to send info in json format. in case can need either serialize value of parameter info (like json.stringify({action: actionvalue})
) or value parameter name (like action: json.stringify(actionvalue)
). see the answer role play bodystyle
attribute (webmessagebodystyle.wrapped
, webmessagebodystyle.wrappedresponse
etc) in wcf method in case.
in jqgrid 4.4.2 or higher (see the answer, my pull request , the fix) can utilize postdata
function. can define either within of ajaxselectoptions
ajaxselectoptions: { contenttype: "application/json", datatype: "json", type: "post", postdata: function (rowid, value, name) { homecoming json.stringify({action: "popcodeadjust"}); //or depend on relinquishment of server side //return {action: json.stringify("popcodeadjust")}); } }
you can specify postdata
alternatively within of editoptions
(see here).
php jqgrid
No comments:
Post a Comment