| Programming C# C++ (7) Delphi (617) Java (8) JavaScript (31) Document (8) Events (8) ExtJS (9) Strings (3) perl (9) php (4) VBScript (1) Visual Basic (1) New related comments Number of comments in the last 48 hours How to prompt the user with an inputbox in Javascript |
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:
| ||||||||||||||||||