codice:
$('.img_dettaglioUtente').click(function(event) {
codUtente = $(this).attr('id').replace("bDettaglioUtente","");
if ($("#tr"+ codUtente).length == 0){
var dataOra = new Date();
var link_pagina = "dettaglioUtente.asp?codUtente="+ codUtente +"&tipo=modifica";
$(this).closest('tr').after('<tr id="tr'+ codUtente +'" ><td id="dettaglioUtente'+ codUtente +'" class="separatoreSotto" colspan="13"></td></tr>');
$("#tr"+ codUtente).hide();
$.ajax({
cache: false,
type: "POST",
url: link_pagina,
data: "ora="+dataOra,
dataType: "html",
success: function(msg){
$("#dettaglioUtente"+ codUtente).html(msg);
},
error: function(msgE){ //request, status, error
//alert("Chiamata fallita!!!");
$("#dettaglioUtente"+ codUtente).html("Si e' verificato l'errore durante l'aggiornamento: "+ msgE.responseText);
}
});
$("#tr"+ codUtente).show().animate({height:200},200);
} else {
$("#tr"+ codUtente).animate({height:0},400).hide().remove();
}
});
function apriFinestra(pagina, nomeFinestra, larghezza, altezza){
lar = larghezza;
alt = altezza;
var wdt = screen.width;
var hgt = screen.height;
var x = Math.round( (wdt/ 2) - (lar / 2) );
var y = Math.round( (hgt/ 2) - (alt / 2) );
//pwd = window.open('nuovaPwd.asp?codUtente=<%=codUtente%>', 'pwd', 'width='+lar+',height='+alt+',left=' + x + ',screenX=' + x + ',top=' + y + ',screenY=' + y +',toolbar=no,menubar=no,location=no,fullscreen=no, scrollbars=yes, resizable=yes,status=yes');
fin = window.open(pagina, nomeFinestra, 'width='+lar+',height='+alt+',left=' + x + ',screenX=' + x + ',top=' + y + ',screenY=' + y +',toolbar=no,menubar=no,location=no,fullscreen=no, scrollbars=yes, resizable=yes,status=yes');
//pwd.resizeTo(100,100);
}
$('.nuovaPassword').click(function() {
codUtente = $(this).prop("id").replace("nuovaPassword","");
apriFinestra('nuovaPwd.asp?codUtente='+ codUtente, 'pwd', 300, 150);
});
$('.eliminaPassword').click(function() {
codUtente = $(this).prop("id").replace("eliminaPassword","");
utente = $(this).closest("tr").find("input[name='utente']").val();
var sino = confirm("Vuoi veramente eliminare tutte le password dell'utente ["+ utente +"]?");
if (sino == true) {
location.href = "db.asp?tipo=eliminaPwd&codUtente="+ codUtente +"&"+ parametriQS;
}
});
la pagina dettaglioutente.asp e' la seguente