Created
September 4, 2013 20:01
-
-
Save dcblogdev/6442104 to your computer and use it in GitHub Desktop.
Delete confirmation example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>Demo</title> | |
<script language="JavaScript" type="text/javascript"> | |
function delnews(id,title) | |
{ | |
if (confirm("Are you sure you want to delete '" + title + "'")){ | |
window.location.href = 'del.php?news=' + id; | |
} | |
} | |
</script> | |
</head> | |
<body> | |
<input type="button" onclick="javascript:delnews('1','this item')" value="delete"> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment