var HttpClient = function() {
    this.get = function(aUrl, aCallback) {
        var anHttpRequest = new XMLHttpRequest();
        anHttpRequest.onreadystatechange = function() {
            if (anHttpRequest.readyState == 4 && anHttpRequest.status == 200)
                aCallback(anHttpRequest.responseText);
        }

        anHttpRequest.open( "GET", aUrl, true );
        anHttpRequest.send( null );
    }
}

function kayit() {
    var values = {};
    var x = document.getElementById("form");
    var inputs = x.elements;
    var nick = inputs[0].value;
    var mail = "mail" + inputs[1].value;
    var query = "/" + nick + "/" + mail + "/";
    var client = new HttpClient();
    client.get('http://146.185.155.241:9998' + query, function(response) {
        document.getElementById("uyari").innerHTML = response;
    });
}