44 lines
841 B
JavaScript
Executable File
44 lines
841 B
JavaScript
Executable File
function EditUsuario()
|
|
{
|
|
new Ajax.Request(WEB_ROOT+'/ajax/usuarios.php',
|
|
{
|
|
method:'post',
|
|
parameters: $('editarUsuarioForm').serialize(true),
|
|
onLoading: function(){
|
|
$("loader").show();
|
|
},
|
|
onSuccess: function(transport){
|
|
var response = transport.responseText || "no response text";
|
|
var splitResponse = response.split("[#]");
|
|
|
|
if(splitResponse[0] == "ok")
|
|
{
|
|
$("editarUsuarioForm").submit();
|
|
}
|
|
else
|
|
{
|
|
ShowStatusPopUp(splitResponse[1]);
|
|
HideFview();
|
|
$("loader").hide();
|
|
}
|
|
|
|
},
|
|
onFailure: function(){ alert('Something went wrong...') }
|
|
});
|
|
}
|
|
|
|
function CheckTipo(){
|
|
|
|
var tipo = $("tipo").value;
|
|
|
|
if(tipo == "supervisor"){
|
|
$("listSuc").hide();
|
|
$("txtSuc").hide();
|
|
$("sucSup").show();
|
|
}else{
|
|
$("listSuc").show();
|
|
$("txtSuc").show();
|
|
$("sucSup").hide();
|
|
}
|
|
|
|
} |