Development Blog by Professionals
Javascript confirm Yes/No
Use a javascript confirm box to ask the user if they want to delete
<script>
function confirmDelete(delUrl) {
if (confirm(“Are you sure you want to delete”)) {
document.location = delUrl;
}
}
</script>
<a href=“javascript:confirmDelete(‘delete.page?id=1′)”>Delete</a>
Another way
<a href=“delete.page?id=1″ onclick=“return confirm(‘Are you sure you want to delete?’)”>Delete</a>
| Print article | This entry was posted by admin on January 15, 2010 at 16:43, and is filed under JavaScript. Follow any responses to this post through RSS 2.0. You can leave a response or trackback from your own site. |


