Click here to Skip to main content
15,867,330 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
C#
$("#year1").change(function(){
    var dataString = $(this).val();
    $.ajax({
    type: "POST",
    url:"Servlet",
    dataType: "json",
    data: {
    year :JSON.stringify(dataString)
    },
    success: function(result) {
    console.log(result);
    $('#category1').multipleSelect({
    filter: true,
    selectAll: false
    });
    }
    });
    return false;
    });

//servlet
response.setContentType("text/html;charset=UTF-8");

PrintWriter out = response.getWriter();

String[] year = request.getParameterValues("year1"); //error


//Hi now my code is based on the id year1 dropdown value, the category1 dropdownlist will appear, but i got null pointer at that line.
Posted
Updated 24-Oct-14 6:11am
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900