I try to send back to the chrome browser 200 OK response, and the browser doesn't react as I expected, he clean the screen instead change the specific 'div', this is my code:
My Server: (node.js):
    function postHandler(request, response) {
    request.on('data', function(data) {
        body += data;
        var parseBody = queryString.parse(body);
        
        response.writeHead(200, {"Content-Type": "text/plain"});
                response.end("<div>divi</div>");
    });
    response.on('end', function() {
        console.log("End_Body: " + body);
    });
}
and my JavaScript browser ajax call looks like:
$(document).ready(function() {
$("#register_form").ketchup();
var request;
$("#submit_btn")
    .on('click',function() {
        var username = $('#reg_username').val();
        var password = $('#reg_password').val();
        var firstname = $('#firstname').val();
        var lastname = $('#lastname').val();
        var age = $('#age').val();
        request = $.ajax({ url: "/welcome.html",
            type: "POST",
            
            data: {
                'username': username,
                'password': password,
                'firstname': firstname,
                'lastname': lastname,
                'age': age
            }});
        request.done(function (response, textStatus, jqXHR){
            $("#server_answer").text("success");
        });
        request.fail(function (jqXHR, textStatus, errorThrown){
            $("#server_answer").text("fail");
           });
        });
});
What am I doing wrong?
 
     
     
     
     
     
    