/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

$(document).ready(function(){
    $("a").click(function(){
        var abfrage = document.searchFormLdapQuery.UserName.value;
        $.ajax({
            type: "POST",
            url: "/NetzwerkRegisterOfPersons/AjaxRequestService",
            data: "UserName=" + abfrage,
            success: function(antwort){
                alert("Hallo Welt: " + antwort);
            }
        });
    });
});


function ajaxRequestUID ( s ){
    $.ajax({
        type: "POST",
        url: "/NetzwerkRegisterOfPersons/AjaxRequestService",
        data: "modeAjax=checkUID&uid=" + s,
        success: function(antwort){
            var substringmessage = antwort.toString().substr(0, 4);
            if(substringmessage != "leer"){
                event_type = 1;
                alert(antwort + " !");
                event_type = 0;
            }
        }
    });
}

function ajaxRequestUIDAndSpecification ( s, m ){
    $.ajax({
        type: "POST",
        url: "/NetzwerkRegisterOfPersons/AjaxRequestService",
        data: "modeAjax=checkUIDAndSpecification&uid=" + s + "&smail=" + m,
        success: function(antwort){
            var substringmessage = antwort.toString().substr(0, 4);
            if(substringmessage != "leer"){
                event_type = 1;
                alert(antwort + " !");
                event_type = 0;
            }
        }
    });
}
