Skip to main content
Participant
July 22, 2010
Question

confirm popup to delete button

  • July 22, 2010
  • 1 reply
  • 724 views

I am trying to add confirm popup to delete function...

Here is the code:

<input name="btnDeleteProgram" type="button" class="formButton" id="btnDeleteProgram" tabindex="#attributes.taborder#"
onclick  =  "window.location='#mySelf##xfa.regAppProgramDel#&APPR_id=#attributes.appr_id#&occ_code=#attributes.occ_code#&spon_prog_num=#attributes.spon_prog_num#'" value="Delete"/>

ADDING THE POPUP:

function confirmDelete()
{ var msg = "Are you sure you want to delete?";
    if ( confirm(msg) )
        { "window.location='#mySelf# #xfa.regAppProgramDel1#"}
}

<input name="btnDeleteProgram" type="button" class="formButton" id="btnDeleteProgram" tabindex="#attributes.taborder#"
onclick  ="confirmDelete();" value="Delete">

popup is working but window location is not working. The delete query is in this fuseaction: xfa.regAppProgramDel1.

    This topic has been closed for replies.

    1 reply

    Inspiring
    July 22, 2010

    Take a look at the js window.confirm() and what it does. It can really simplify your page.

    Participant
    July 23, 2010

    Thanks for your information, I already finished my work. Just i forgot to

    put cfoutput, that's why i got error...

    Here is the code, If any body want to use fuseaction to window.location

    Thank You