async function send(command){
    alert(JSON.stringify(command));
    $.post(PkcsApp + "getCert",command,function(data) {
         $("#cert").text(data);
    });
}





function certificateRequest(e){
    e.preventDefault();
    $("#cert").text("Obtaining certificate, please wait...");
    
    type = $("#type").val();
    send({"type":type});
}


$( document ).ready(function() {
    
    $("#certificate").submit(certificateRequest);
    
});