I have a Java servlet, that i need to call and pass it a variable using Ajax. I have written an Ajax script, to get the variable that needs to be passed to the servlet. However i am not sure how to do so. Any help on this matter please? This is my ajax code:
var data;
    data = "NUMBER ='" + Number + "'";
    var Key = '';
    $.ajax({
        type: "POST",
        url: "Record?DB=EMP&Table=EMP_HISTORY&",
        dataType: 'xml',
        data: {
            "Where": data
        },
        success: function(xml) {
            $(xml).find('record').each(function() {
                key  = $(this).find("PK").text();
            });
        },
        error: function(error) {
        }
    });
 
     
    