| Programming C# C++ (7) Delphi (604) Java (8) JavaScript (55) Document (8) Events (8) Strings (3) perl (40) php (12) VBScript (1) Visual Basic (1) |
Ask for a confirmation in Javascript before a critical action
Question: How can I prompt a user to confirm critical actions like deleting records?Answer: Use the javascript confirm() function. It looks similar to the alert() box, but has an OK and a CANCEL button.If the user clicks OK, confirm() will return true. Otherwise - escape, or click on CANCEL - it will return false.
Comments:
|