我正在使用4.13.3 - 免费的jqGrid。
我的添加表单中有两个选择列表。在第一个列表中,我触发了一个运行ajax调用的数据事件,并返回选择列表标记的html代码。
我想将第二个选择列表更改为此HTML代码。我在回调中获得了htlm代码,但第二个选择列表没有更改为返回的代码。
这是一个代码片段:
function biAddForm(formId){
$("#shippingdocsqueue").setColProp('groupno', { editoptions: { dataUrl: '/QMSWebApp/ShippingDocumentControllerServletV7?lifecycle=groupnolist'}});
$("#shippingdocsqueue").setColProp('boeingcontract', { editoptions: { dataUrl: '/QMSWebApp/GenericControllerServlet?lifecycle=threewayoptionlist'}});
$("#shippingdocsqueue").setColProp('shippertype', { editoptions: { dataUrl: '/QMSWebApp/ShippingDocumentControllerServletV7?lifecycle=shippertypelist'}});
$("#shippingdocsqueue").setColProp('shippertype', { editoptions: {dataEvents: [{ type: 'change', fn: function(e) {shipperscopeconfig(this.value); }}]}});
//$("#shippingdocsqueue").setColProp('shipperscope', { editoptions: { dataUrl: '/QMSWebApp/ShippingDocumentControllerServletV7?lifecycle=shipperscopelist'}});
$("#shippingdocsqueue").setColProp('ife', { editoptions: { dataUrl: '/QMSWebApp/GenericControllerServlet?lifecycle=threewayoptionlist'}});
$("#shippingdocsqueue").setColProp('greinercushions', { editoptions: { dataUrl: '/QMSWebApp/GenericControllerServlet?lifecycle=threewayoptionlist'}});
$("#shippingdocsqueue").setColProp('retroshipment', { editoptions: { dataUrl: '/QMSWebApp/GenericControllerServlet?lifecycle=threewayoptionlist'}});
$("#shippingdocsqueue").setColProp('requires8130', { editoptions: { dataUrl: '/QMSWebApp/GenericControllerServlet?lifecycle=threewayoptionlist'}});
$("#shippingdocsqueue").setColProp('delegationflag', { editoptions: { dataUrl: '/QMSWebApp/ShippingDocumentControllerServletV7?lifecycle=shipperyesnoonlylist'}});
$("#shippingdocsqueue").setColProp('embraer', { editoptions: { dataUrl: '/QMSWebApp/GenericControllerServlet?lifecycle=threewayoptionlist'}});
$("#shippingdocsqueue").setColProp('dsaflag', { editoptions: { dataUrl: '/QMSWebApp/GenericControllerServlet?lifecycle=threewayoptionlist'}});
};
function shipperscopeconfig(shiptype){
alert("shipperscopeconfig: " + shiptype);
switch(parseInt(shiptype)){
case 3:
break;
default:
alert("Running Default");
$.post("/QMSWebApp/ShippingDocumentControllerServletV7",
{lifecycle:"shipperscopelist"}, scResults, 'JSON');
break;
}
}
function scResults(wResults){
alert(wResults.selstmt);
$('#shipperscope').html(wResults.selstmt);
}