Skip to main content
Inspiring
March 20, 2007
Question

OT: Best way to implement an "ARE YOU SURE?" trap

  • March 20, 2007
  • 15 replies
  • 707 views
For a record delete function, what's the best way to implement such a
confirmation widgie?

--
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.dreamweavermx-templates.com - Template Triage!
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
==================



This topic has been closed for replies.

15 replies

Inspiring
March 20, 2007
onClick = "return confirm('Delete this record?');"


"Murray *ACE*" <forums@HAHAgreat-web-sights.com> wrote in message
news:etp95l$fl6$1@forums.macromedia.com...
> Thanks, Joe. This is for an admin function, not the general public. And
> it's to prevent inadvertant record deletions that seem to be happening
> with alarming frequency with this particular site! 8)
>
> I think I'll opt for the javascript pop-up just now. So, how's that work
> again? 8)
>
> --
> Murray --- ICQ 71997575
> Adobe Community Expert
> (If you *MUST* email me, don't LAUGH when you do so!)
> ==================
> http://www.dreamweavermx-templates.com - Template Triage!
> http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
> http://www.dwfaq.com - DW FAQs, Tutorials & Resources
> http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
> ==================
>
>
> "Joe Makowiec" <makowiec@invalid.invalid> wrote in message
> news:Xns98F98BFE94E74makowiecatnycapdotrE@216.104.212.96...
>> On 20 Mar 2007 in macromedia.dreamweaver.appdev, Murray *ACE* wrote:
>>
>>> For a record delete function, what's the best way to implement such a
>>> confirmation widgie?
>>
>> I don't know as there's a best way. Some of us will say something like
>> 'If I wasn't sure, I wouldn't be doing it'.
>>
>> But I can think of a few:
>> - Checkbox you have to tick, in addition to whatever else you have to do,
>> to make the script fire. Error message is something like "You didn't
>> check the box beneath the list of records to delete that says []OK to
>> delete"
>> - Intermediate page, requiring another button click, that links to the
>> actual deletion script
>> - Javascript popup "Are you sure?" before the script fires
>>
>> Of the three, I'd pick the intermediate page option, but you're still
>> going to annoy some people. As always, YMMV.
>>
>> --
>> Joe Makowiec
>> http://makowiec.net/
>> Email: http://makowiec.net/contact.php
>
>


Inspiring
March 20, 2007
Yeah - I think I'll try the javascript approach first, and see if the admin
complains! 8)

--
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.dreamweavermx-templates.com - Template Triage!
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
==================


"darrel" <notreal@nowhere.com> wrote in message
news:etp8cg$egn$1@forums.macromedia.com...
>> For a record delete function, what's the best way to implement such a
>> confirmation widgie?
>
> No idea if it's 'best' but what I do:
>
> Page with DELETE icon links to the CONFIRMATION page and passes the record
> information via querystring.
>
> This other page takes the querystring info, checks it against permissions
> and if the person has permissions, prompts them with an ARE YOU SURE?
> prompt.
>
> They then click YES, CONFIRMATION page deletes the record and redirects
> back to the first page.
>
> -Darrel
>


Inspiring
March 20, 2007
Thanks, Joe. This is for an admin function, not the general public. And
it's to prevent inadvertant record deletions that seem to be happening with
alarming frequency with this particular site! 8)

I think I'll opt for the javascript pop-up just now. So, how's that work
again? 8)

--
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.dreamweavermx-templates.com - Template Triage!
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
==================


"Joe Makowiec" <makowiec@invalid.invalid> wrote in message
news:Xns98F98BFE94E74makowiecatnycapdotrE@216.104.212.96...
> On 20 Mar 2007 in macromedia.dreamweaver.appdev, Murray *ACE* wrote:
>
>> For a record delete function, what's the best way to implement such a
>> confirmation widgie?
>
> I don't know as there's a best way. Some of us will say something like
> 'If I wasn't sure, I wouldn't be doing it'.
>
> But I can think of a few:
> - Checkbox you have to tick, in addition to whatever else you have to do,
> to make the script fire. Error message is something like "You didn't
> check the box beneath the list of records to delete that says []OK to
> delete"
> - Intermediate page, requiring another button click, that links to the
> actual deletion script
> - Javascript popup "Are you sure?" before the script fires
>
> Of the three, I'd pick the intermediate page option, but you're still
> going to annoy some people. As always, YMMV.
>
> --
> Joe Makowiec
> http://makowiec.net/
> Email: http://makowiec.net/contact.php


Inspiring
March 20, 2007
> For a record delete function, what's the best way to implement such a
> confirmation widgie?

No idea if it's 'best' but what I do:

Page with DELETE icon links to the CONFIRMATION page and passes the record
information via querystring.

This other page takes the querystring info, checks it against permissions
and if the person has permissions, prompts them with an ARE YOU SURE?
prompt.

They then click YES, CONFIRMATION page deletes the record and redirects back
to the first page.

-Darrel


Inspiring
March 20, 2007
On 20 Mar 2007 in macromedia.dreamweaver.appdev, Murray *ACE* wrote:

> For a record delete function, what's the best way to implement such a
> confirmation widgie?

I don't know as there's a best way. Some of us will say something like
'If I wasn't sure, I wouldn't be doing it'.

But I can think of a few:
- Checkbox you have to tick, in addition to whatever else you have to do,
to make the script fire. Error message is something like "You didn't
check the box beneath the list of records to delete that says []OK to
delete"
- Intermediate page, requiring another button click, that links to the
actual deletion script
- Javascript popup "Are you sure?" before the script fires

Of the three, I'd pick the intermediate page option, but you're still
going to annoy some people. As always, YMMV.

--
Joe Makowiec
http://makowiec.net/
Email: http://makowiec.net/contact.php