delete from CLIENT where CLIENT_NO = '#Form.ClientNo#'

Client has been deleted!

-- Ian O'Betz Clear Results [url]www.clearresults.net[/url] "headjava" wrote in message news:cvim4j$esi$1@forums.macromedia.com...[quote] > I'm also looking to confirm delete. I tried the follow code but CF says[/quote] the[quote] > field is not in form and I'm not sure why. Please take a look. > > > > > > > > > delete from CLIENT > where CLIENT_NO = '#Form.ClientNo#' > >

Client has been deleted!

>
>
>
>
> > I was about to post this in a new topic. Thanks >[/quote] [allowsmilie] => 1 [showsignature] => 0 [ipaddress] => [iconid] => 0 [visible] => 1 [attach] => 0 [infraction] => 0 [reportthreadid] => 0 [isusenetpost] => 1 [msgid] => [ref] => [htmlstate] => on_nl2br [postusername] => Ian O'Betz [ip] => "Ian O'Betz" 0 [usergroupid] => [membergroupids] => [displaygroupid] => [password] => [passworddate] => [email] => [styleid] => [parentemail] => [homepage] => [icq] => [aim] => [yahoo] => [msn] => [skype] => [showvbcode] => [showbirthday] => [usertitle] => [customtitle] => [joindate] => [daysprune] => [lastvisit] => [lastactivity] => [lastpost] => [lastpostid] => [posts] => [reputation] => [reputationlevelid] => [timezoneoffset] => [pmpopup] => [avatarid] => [avatarrevision] => [profilepicrevision] => [sigpicrevision] => [options] => [akvbghsfs_optionsfield] => [birthday] => [birthday_search] => [maxposts] => [startofweek] => [referrerid] => [languageid] => [emailstamp] => [threadedmode] => [autosubscribe] => [pmtotal] => [pmunread] => [salt] => [ipoints] => [infractions] => [warnings] => [infractiongroupids] => [infractiongroupid] => [adminoptions] => [profilevisits] => [friendcount] => [friendreqcount] => [vmunreadcount] => [vmmoderatedcount] => [socgroupinvitecount] => [socgroupreqcount] => [pcunreadcount] => [pcmoderatedcount] => [gmmoderatedcount] => [assetposthash] => [fbuserid] => [fbjoindate] => [fbname] => [logintype] => [fbaccesstoken] => [newrepcount] => [vbseo_likes_in] => [vbseo_likes_out] => [vbseo_likes_unread] => [temp] => [field1] => [field2] => [field3] => [field4] => [field5] => [subfolders] => [pmfolders] => [buddylist] => [ignorelist] => [signature] => [searchprefs] => [rank] => [icontitle] => [iconpath] => [avatarpath] => [hascustomavatar] => 0 [avatardateline] => [avwidth] => [avheight] => [edit_userid] => [edit_username] => [edit_dateline] => [edit_reason] => [hashistory] => [pagetext_html] => [hasimages] => [signatureparsed] => [sighasimages] => [sigpic] => [sigpicdateline] => [sigpicwidth] => [sigpicheight] => [postcount] => 5 [islastshown] => [isfirstshown] => [attachments] => [allattachments] => ) --> flash form and confirm delete - Macromedia ColdFusion

flash form and confirm delete - Macromedia ColdFusion

I know alert() function is available to cfforms. I also understand confirm() did not ship in this release. I have a delete button on a form and I use Javascript to ask the user to confirm their delete action. Has anyone else had this need and come up with a solution? -- Thanks Ian O'Betz [url]www.premier-ed.com[/url]...

  1. #1

    Default flash form and confirm delete

    I know alert() function is available to cfforms. I also understand confirm()
    did not ship in this release. I have a delete button on a form and I use
    Javascript to ask the user to confirm their delete action. Has anyone else
    had this need and come up with a solution?

    --
    Thanks
    Ian O'Betz
    [url]www.premier-ed.com[/url]


    Ian O'Betz Guest

  2. #2

    Default Re: flash form and confirm delete

    Try the attached code:

    JG4



    <cfform format="flash" skin="halogreen">
    <cfinput type="button" name="btn" value="Delete" onclick="getURL(""javascript: alert('test');"");"><br>
    </cfform>
    jg4smile Guest

  3. #3

    Default Re: flash form and confirm delete

    Alert works just fine. It's confirm I need to figure out. here's what I've
    come up with so far:

    <cfinput type="button" name="test" value="Confirm"
    onclick="addListenerEvent(alert('Confirm
    please...','WARNING',YES|NO,this.parent,testview.t ext.click(this)))" />

    I don't know how to get the Yes/No value into the input field named
    testview.

    - Ian

    "jg4smile" <webforumsusermacromedia.com> wrote in message
    news:cv34d8$fbc$1forums.macromedia.com...
    > Try the attached code:
    >
    > JG4
    >
    >
    >
    > <cfform format="flash" skin="halogreen">
    > <cfinput type="button" name="btn" value="Delete"
    onclick="getURL(""javascript: alert('test');"");"><br>
    > </cfform>

    Ian O'Betz Guest

  4. #4

    Default Re: flash form and confirm delete

    I'm also looking to confirm delete. I tried the follow code but CF says the
    field is not in form and I'm not sure why. Please take a look.

    <cfcase value="Delete">
    <cfif FORM.ClientNo IS NOT "">
    <cfform name="deleteclient" method="post">
    <input type="hidden" name="daction" value="">
    <SCRIPT LANGUAGE="JavaScript">
    if (confirm('Are you sure ?')) {
    doent.deleteclient.daction.value = "Y"
    } else {
    doent.deleteclient.daction.value = "N" }
    </SCRIPT>
    <cfif FORM.daction EQ "Y">
    <cfquery name="DeleteClient" dataSource="PCA_MAST">
    delete from CLIENT
    where CLIENT_NO = '#Form.ClientNo#'
    </cfquery>
    <p><font color="Green">Client has been deleted!</font></p>
    </cfif>
    </cfform>
    </cfif>
    </cfcase>

    I was about to post this in a new topic. Thanks

    headjava Guest

  5. #5

    Default Re: flash form and confirm delete

    Your using regular forms. I'm using Flash Forms and trying to confirm using
    ActionScript. Your first problem is trying to use Javascript to pass
    variables back to ColdFusion (from what I can see of your code). By the time
    Javascript is processing, ColdFusion is already done and done. Here is what
    you want:

    <!--- Process form that has been submitted --->
    <cfif IsDefined("Form.Delete")>
    <cfquery name="DeleteClient" dataSource="PCA_MAST">
    delete from CLIENT
    where CLIENT_NO = '#Form.ClientNo#'
    </cfquery>
    <p><font color="Green">Client has been deleted!</font></p>
    <cfabort>
    </cfif>

    <!--- Form to have your ClientID and a delete button --->
    <cfform name="deleteclient" method="post" action="index.cfm"
    onsubmit="return confirm('Are you sure you wish to delete?');">
    <cfoutput>
    <input type="hidden" name="ClientNo" value="#MyQuery.ClientNo#">
    </cfoutput>
    <input type="submit" name="delete" value="Delete Client">
    </cfif>
    </cfform>


    --
    Ian O'Betz
    Clear Results
    [url]www.clearresults.net[/url]


    "headjava" <webforumsusermacromedia.com> wrote in message
    news:cvim4j$esi$1forums.macromedia.com...
    > I'm also looking to confirm delete. I tried the follow code but CF says
    the
    > field is not in form and I'm not sure why. Please take a look.
    >
    > <cfcase value="Delete">
    > <cfif FORM.ClientNo IS NOT "">
    > <cfform name="deleteclient" method="post">
    > <input type="hidden" name="daction" value="">
    > <SCRIPT LANGUAGE="JavaScript">
    > if (confirm('Are you sure ?')) {
    > doent.deleteclient.daction.value = "Y"
    > } else {
    > doent.deleteclient.daction.value = "N" }
    > </SCRIPT>
    > <cfif FORM.daction EQ "Y">
    > <cfquery name="DeleteClient" dataSource="PCA_MAST">
    > delete from CLIENT
    > where CLIENT_NO = '#Form.ClientNo#'
    > </cfquery>
    > <p><font color="Green">Client has been deleted!</font></p>
    > </cfif>
    > </cfform>
    > </cfif>
    > </cfcase>
    >
    > I was about to post this in a new topic. Thanks
    >

    Ian O'Betz Guest

  6. #6

    Default Re: flash form and confirm delete

    Because my template performs Add/Edit/Delete on the same template, doing a
    javascript confirm was tricky. Solution below.
    <input type="Button" value=" Delete "
    onClick="Javascript:doent.CurrentClientForm.Pag eAction.value='Delete';if
    (confirm('Do you want to delete this client ?')) {
    doent.CurrentClientForm.submit() }else { };">


    headjava Guest

  7. #7

    Default Re: flash form and confirm delete

    PLEASE: FLASHFORM Confirmation before submit is an important topic. Let's
    keep the thread related to flashforms with actionscript. Confirm() isn't
    available. What we need to do is find a alert() workaround for now (or some
    kind of work-around for a confirm Yes|NO before submit. Anyone with a
    solution???

    doncyberwolf Guest

  8. #8

    Default Re: flash form and confirm delete

    I absolutely agree. It would be nice to get some input from Macromedia about
    a work around. So far, they have been pretty quiet about this particular
    subject. Might be nice to get someone who is very familiar with this to play
    around with it. the code I have been working is as follows:

    <cfinput type="button" name="test" value="Confirm" onclick="if
    (alert('Confirm please...','WARNING',YES|NO) == NO) {testview.text =
    'submit'}" />
    <cfinput name="testview">

    --
    Ian O'Betz
    Clear Results
    [url]www.clearresults.net[/url]


    "doncyberwolf" <webforumsusermacromedia.com> wrote in message
    news:cvlq48$a98$1forums.macromedia.com...
    > PLEASE: FLASHFORM Confirmation before submit is an important topic.
    Let's
    > keep the thread related to flashforms with actionscript. Confirm() isn't
    > available. What we need to do is find a alert() workaround for now (or
    some
    > kind of work-around for a confirm Yes|NO before submit. Anyone with a
    > solution???
    >

    Ian O'Betz Guest

Similar Threads

  1. Confirm before delete
    By Pixel Pusher in forum Macromedia Exchange Dreamweaver Extensions
    Replies: 1
    Last Post: November 10th, 05:47 AM
  2. Confirm Delete in DataGrid
    By in forum ASP.NET Data Grid Control
    Replies: 19
    Last Post: September 14th, 09:06 AM
  3. Add Confirm to Delete button in repeater
    By Roger Twomey in forum ASP.NET Data Grid Control
    Replies: 1
    Last Post: June 5th, 12:28 AM
  4. confirm before delete ?
    By mark in forum ASP.NET Data Grid Control
    Replies: 2
    Last Post: May 20th, 02:15 PM
  5. confirm delete prompt
    By Oliver Jobson in forum Windows XP/2000/ME
    Replies: 1
    Last Post: July 6th, 09:21 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •