1 頁 (共 1 頁)

CCS 5.1 jquery autocomplete send multi query

發表於 : 2013-08-30 15:48:12
yehlu

代碼: 選擇全部

    params["zipcodeSearchs_areaJDependentListBox1"] = {
        serviceUrl: "../services/win_zipcode_zipcodeSearch_s_area_JDependentListBox1.php",
        masterPath: "zipcodeSearch, s_city"
    };
    params["zipcodeSearchs_roadJAutocomplete1"] = { 
        template: '{@text_desc}',
        value: "label",
        customCssClassName: "zipcodeSearchs_road-autocomplete",
//        source: "../services/win_zipcode_zipcodeSearch_s_road_JAutocomplete1.php",
 		source: function(request, response) {
            $.ajax({
                url: "../services/win_zipcode_zipcodeSearch_s_road_JAutocomplete1.php",
                dataType: "json",
                data: {
                    term : request.term,
                    s_zip : $("#zipcodeSearchs_zip").val(),
                    s_city : $("#zipcodeSearchs_city").val(),
                    s_area : $("#zipcodeSearchs_area").val()                    
                },
                success: function(data) {
                    response(data);
                }
            });
        },        
    };