function deleteUser(user){ if (confirm('Are you sure?')) { var posting = $.post("delete.php", { user: user}, function(data) { $( ".result" ).html( data ); if (data=="success") { $( ".result" ).html("
User "+user+" deleted.
"); $(".result").show( "fast" ); $('.id-' + user).remove(); } else { $( ".result" ).html("An error occured.
"); } } ); } } function setUserField(user, email, name) { $(".userfield").val(user); $(".emailfield").val(email); $(".namefield").val(name); $(".passwordfield").focus(); }