I'm currently coding an application where you can press the delete button and the record will be deleted, but I want some sort of 'Are you sure?' window to appear with OK and Cancel buttons, cancel stops the action, and OK lets it continue. I know I need some JavaScript here, but even with it, would I be able to do something simlar to this...
Code: Select all
if user wants to delete a record then
prompt them with an are you sure window
if the user clicked ok in the are you sure window then
delete the record
end if
end ifAn example of what I am trying to achieve can be seen by deleting something in PHPMyAdmin.
Can someone tell me how this kind of thing would be done?
Ps. I'm lacking JavaScript experience
Thanks.