[Catalyst] how to confirm before deleteing
wbs at grepit.net
Wed Jan 21 17:49:17 GMT 2009
On Wed, Jan 21, 2009 at 10:22 AM, Simon Wilcox
<simonw at digitalcraftsmen.net>wrote:
> Dave Howorth wrote:
>> Paul Falbe wrote:
>>> That works thank you very much. Don't know how many google searchs I d=
>>> trying to find that out!
>> Rodrigo-51 wrote:
> Or if you have some like Google's ill-fated prefetch running, caching all
> the links it finds on a page ?
> GETing a link should really only be used when the action is idempotent. If
> it changes stuff then you ought to use a POST via a form button.
YES! There are rare cases where a get may enable consequences, but this
is not one of them.
<form method=3D"POST" action=3D"/yourapp/account/do_delete">
<input type=3D"hidden" name=3D"accountid" value=3D"23948234">
<input type=3D"submit" name=3D"delete"
value=3D"Delete My Account"
'Are you sure you want to delete your account?');">
This both checks if the user really wants to delete (if js is enabled) and
also uses a post to delete data via the app.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Catalyst