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

confirm popup to delete button

New Here ,
Jul 22, 2010 Jul 22, 2010

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.

701
Translate
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 ,
Jul 22, 2010 Jul 22, 2010

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

Translate
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
New Here ,
Jul 23, 2010 Jul 23, 2010
LATEST

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

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