1

我在 ajax 更新面板中有两个组合框,在更新面板之外有一个JQuery 自动完成文本框

我的问题是当我从客户端组合框中选择时,我需要将值传递给服务方法

这是我的代码agentid总是空的

jQuery(function test(agentid) {
            agentid = $("#val_client").val();
            options = { 
                        serviceUrl: '../../proxy/workorder/WorkOrderService.svc/GetAllPropertyListAutoComplete', 
                        params: { _agency: agentid },
                        onSelect: function (value, data) {
                               var record = new Array();
                               record = data.split('|');
                               document.getElementById('workTitle').value = record[0] ? record[0] : record[1];
                               document.getElementById('workAddress').value = record[1] ? record[1] : record[0];
                               document.getElementById('workSiteContact').value = record[2];
                               document.getElementById('workSiteContactNumber').value = record[3];
                               $('#workTitle').attr('readonly', true);
                               $('#workAddress').attr('readonly', true);
                                return false;
                          }
                       }
            a = $('#txt_Properties').autocompletev2(options);
        });
4

1 回答 1

0

您的下拉列表 ID 是“val_client”吗?

于 2012-12-04T13:02:00.007 回答