Date: 03/24/05 (PHP Community) Keywords: php, browser, java Hi all function confirm_delete() { var msg = "Are you sure you want to delete the user?"; if (confirm(msg)) //window.alert("Delete"); location.replace("delete_user.php"); else //window.alert("dont delete"); location.replace("list_users.php"); } And here is the form line that calls it : form method="POST" name="delete_user17" action="delete_user.php" onsubmit="confirm_delete();" input type="hidden" name="user_id" value="17" Source: http://www.livejournal.com/community/php/276608.html
|