Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

ajax

        var value = $("#quicksearchtext").val();
        
        var model =
        {
            industryCode : value
        }

        $.ajax({
            url: "/Setting/GetSubIndustryList",
            type: "POST",
            contentType: "application/json;charset=utf-8",
            dataType: "json",
            async: false,
            data: JSON.stringify(model),
            success: function (res) {
                console.log('doGetBeamSubIndustry success');
                $("#txtBusinessSubIndustry").find('option').remove();

                $.each(res.message, function (index, value) {
                    $("#txtBusinessSubIndustry").append("<option value=" + value.code + ">" + value.names.en + "</option>");
                });

            },
            error: function (jqXHR, exception) {
                console.log('doGetBeamSubIndustry error');
                console.log(jqXHR.responseText);
            }
        });
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #ajax
ADD COMMENT
Topic
Name
4+8 =