[Catalyst] how to confirm before deleteing
Jesse Sheidlower
jester at panix.com
Wed Jan 21 14:50:22 GMT 2009
On Wed, Jan 21, 2009 at 06:19:06AM -0800, Paul Falbe wrote:
>
> That works thank you very much. Don't know how many google searchs I did
> trying to find that out!
Yes, but if the user has JS disabled, you have a problem.
What I typically do is have two separate actions, a "delete"
and a "do_delete". The "delete" action merely displays the
record and has a form (link, whatever) asking "Are you sure?",
and then if they agree, you perform the "do_delete" that does
the business.
You could also have a single delete action but with a
"confirm" parameter signalling that you're really deleting,
etc. There are lots of options.
You can pair this with JS if you want.
Best,
Jesse Sheidlower
> Rodrigo-51 wrote:
> >
> > Paul, how about a javascript confirm() box?
> >
> > <body>
> > yourcontroller/delete/row_id Delete
> > Row
> > </body>
> >
> > cheers,
> > -rodrigo
> >
> > On Wed, Jan 21, 2009 at 2:23 PM, Paul Falbe <paul at cassens.com> wrote:
> >
> >>
> >> I writting my first little Catalyst app and need todo a delete function.
> >> I
> >> have a link for users to delete a row in a sqlite table. My question is
> >> what is the prefered rocess for asking "You selected delete. Do you
> >> really
> >> want todo this?".
> >>
> >> Thanks in advance!
> >>
> >> -Paul
> >> --
> >> View this message in context:
> >> http://www.nabble.com/how-to-confirm-before-deleteing-tp21583057p21583057.html
> >> Sent from the Catalyst Web Framework mailing list archive at Nabble.com.
> >>
> >>
> >> _______________________________________________
> >> List: Catalyst at lists.scsys.co.uk
> >> Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
> >> Searchable archive:
> >> http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
> >> Dev site: http://dev.catalyst.perl.org/
> >>
> >
> > _______________________________________________
> > List: Catalyst at lists.scsys.co.uk
> > Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
> > Searchable archive:
> > http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
> > Dev site: http://dev.catalyst.perl.org/
> >
> >
>
> --
> View this message in context: http://www.nabble.com/how-to-confirm-before-deleteing-tp21583057p21583988.html
> Sent from the Catalyst Web Framework mailing list archive at Nabble.com.
>
>
> _______________________________________________
> List: Catalyst at lists.scsys.co.uk
> Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
> Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
> Dev site: http://dev.catalyst.perl.org/
More information about the Catalyst
mailing list