Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
0

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

LEGEND ,
Mar 20, 2007 Mar 20, 2007

Copy link to clipboard

Copied

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
==================



TOPICS
Server side applications

Views

680
Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Mar 20, 2007 Mar 20, 2007

Copy link to clipboard

Copied

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

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Mar 20, 2007 Mar 20, 2007

Copy link to clipboard

Copied

> 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


Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Mar 20, 2007 Mar 20, 2007

Copy link to clipboard

Copied

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


Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Mar 20, 2007 Mar 20, 2007

Copy link to clipboard

Copied

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
>


Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Mar 20, 2007 Mar 20, 2007

Copy link to clipboard

Copied

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
>
>


Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Mar 20, 2007 Mar 20, 2007

Copy link to clipboard

Copied

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

Ya know, that probably makes more sense anyways. You have all the permission
info already on that page, and javascript is common on most admin interfaces
anyways.

Hmm...now I have to rethink my methods...;o)

-Darrel


Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Mar 20, 2007 Mar 20, 2007

Copy link to clipboard

Copied

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:etpc3t$jfm$1@forums.macromedia.com...
>> Yeah - I think I'll try the javascript approach first, and see if the
>> admin complains! 8)
>
> Ya know, that probably makes more sense anyways. You have all the
> permission info already on that page, and javascript is common on most
> admin interfaces anyways.
>
> Hmm...now I have to rethink my methods...;o)
>
> -Darrel
>


Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Mar 20, 2007 Mar 20, 2007

Copy link to clipboard

Copied

http://www.tom-muck.com/extensions/help/ConfirmLinks/

free extension from Tom Muck

--
Dave Buchholz
I-CRE8
www.i-cre8.co.uk
Skype ID: I-CRE8



"Murray *ACE*" <forums@HAHAgreat-web-sights.com> wrote in message
news:etp5ef$aig$1@forums.macromedia.com...
> 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
> ==================
>
>
>


Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Mar 20, 2007 Mar 20, 2007

Copy link to clipboard

Copied

So - that fires with a return true if confirmed, which allows the href to
kick in?

--
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
==================


"Lionstone" <HIDElionstone@HIDEhushmail.com> wrote in message
news:etpbmb$isk$1@forums.macromedia.com...
> 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
>>
>>
>
>


Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Mar 20, 2007 Mar 20, 2007

Copy link to clipboard

Copied

Just did it manually! 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
==================


"Dave Buchholz" <forums@REMOVETHISi-cre8.co.uk> wrote in message
news:etpd9f$l0r$1@forums.macromedia.com...
> http://www.tom-muck.com/extensions/help/ConfirmLinks/
>
> free extension from Tom Muck
>
> --
> Dave Buchholz
> I-CRE8
> www.i-cre8.co.uk
> Skype ID: I-CRE8
>
>
>
> "Murray *ACE*" <forums@HAHAgreat-web-sights.com> wrote in message
> news:etp5ef$aig$1@forums.macromedia.com...
>> 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
>> ==================
>>
>>
>>
>
>


Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Mar 20, 2007 Mar 20, 2007

Copy link to clipboard

Copied

On Tue, 20 Mar 2007 15:41:55 -0400, "Murray *ACE*"
<forums@HAHAgreat-web-sights.com> wrote:

>So - that fires with a return true if confirmed, which allows the href to
>kick in?

Actually, I'd stick it in the form's onSubmit handler:

<form onSubmit="return confirm('are you sure?')" ...

Gary

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Mar 20, 2007 Mar 20, 2007

Copy link to clipboard

Copied

In my case, that's not the optimal place, since there is a link to a delete
process page. Putting it on the link works perfectly....

--
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
==================


"Gary White" <reply@newsgroup.please> wrote in message
news:8ul003hlde0oa4ou71mdnmta4tc1j9t42f@4ax.com...
> On Tue, 20 Mar 2007 15:41:55 -0400, "Murray *ACE*"
> <forums@HAHAgreat-web-sights.com> wrote:
>
>>So - that fires with a return true if confirmed, which allows the href to
>>kick in?
>
> Actually, I'd stick it in the form's onSubmit handler:
>
> <form onSubmit="return confirm('are you sure?')" ...
>
> Gary


Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Mar 21, 2007 Mar 21, 2007

Copy link to clipboard

Copied

On Tue, 20 Mar 2007 17:59:17 -0400, "Murray *ACE*"
<forums@HAHAgreat-web-sights.com> wrote:

>In my case, that's not the optimal place, since there is a link to a delete
>process page. Putting it on the link works perfectly....


Okay.

Gary

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Mar 21, 2007 Mar 21, 2007

Copy link to clipboard

Copied

"darrel" <notreal@nowhere.com> wrote in message
news:etpc3t$jfm$1@forums.macromedia.com...
> Ya know, that probably makes more sense anyways. You have all the
> permission info already on that page, and javascript is common on most
> admin interfaces anyways.
>
> Hmm...now I have to rethink my methods...;o)
>
> -Darrel

You're where I was a few months ago. I used to religiously avoid javascript
for anything non-trivial (image swaps were OK). Now I just go for it. I
make non-JS alternatives (which is usually pretty easy) for anything
critical; don't bother for anything cosmetic.


Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Mar 21, 2007 Mar 21, 2007

Copy link to clipboard

Copied

LATEST
> You're where I was a few months ago. I used to religiously avoid
> javascript for anything non-trivial (image swaps were OK). Now I just go
> for it. I make non-JS alternatives (which is usually pretty easy) for
> anything critical; don't bother for anything cosmetic.

Yea. For web-apps, especially, I'm relying much more on javascript now
anyways as clients request drag-and-drop interfaces and the like. It's a tad
frustrating as it's not nearly as accessible, but when the audience is only
going to be 2 or 3 people with specific requests, why not?

-Darrel


Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines