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) { $(".userfield").val(user); $(".passwordfield").focus(); }