Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
Take a look at the js window.confirm() and what it does. It can really simplify your page.
Copy link to clipboard
Copied
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