[webERP-users] Delete Confirmation

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

[webERP-users] Delete Confirmation

Hi All,

I've added a simple but useful confirmation box for those 'dangerous'
delete buttons, like this...
on every 'input' tag for buttons, add 'onclick' attribute, e.g.:
from this...
    echo '<P><input type="Submit" name="delete" value="' . _('Delete
This Item') . '">';

to this...
    echo '<P><input type="Submit" name="delete" value="' . _('Delete
This Item') . '" onclick="return confirm(\'Are You Sure?\');">';

It will show you the message 'Are You Sure?' with the 'Yes' or 'No'
buttons. If you you click 'Yes', it will proceed to the action (ie:
Delete!). If you click 'No', nothing's happens.

Still figuring out how to add this confirmation box to the delete 'link'
(using 'a' tag) usually used on tables data...


SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
web-ERP-users mailing list
[hidden email]