confirm popup to delete button
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.
