Confirming a user's action
If you have links whose action is irreversible and you want to make the user confirm what they are doing then you could use the JavaScript onclick event.
The HTML to invoke this is:
<a href="../ViewName/DocID?DeleteDocument" onclick="return confirm('Are you sure you want to delete this document?');">Delete Document...</a>
The onClick event will return either of two values depending on whether the user clicks 'Ok' or 'Cancel':
true - the link should be opened;
false - do not be opened;
Feedback
Hear that? Silence! Be the first to talk. Use the form below...
Add your own response here:
Although your email address isn't required it is protected from spambots if you choose to provide it and not to hide it. My right to remove commercial, irrelevant or posts I just don't like is reserved.
Navigate other articles in the category "Quick Tips"