Programming C# C++ (7) Delphi (52) Java (108) JavaScript (31) Document (8) Events (24) ExtJS (57) Strings (117) perl (441) php (884) VBScript (131) Visual Basic (3539) ![]() |
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.
Content-type: text/html
Comments:
|