I have a simple modal popup dialog launched on the "register" button of a "new element" form :
$( "#ctl00_m_g_9ff78e92_ed40_4212_ae0f_44b787664fa8_ctl00_toolBarTbl_RightRptControls_ctl00_ctl00_diidIOSaveItem" ).click(function() {
if (confirm("Confirmez-vous ce choix de réforme ? : ")) {
}
else {
return false;
}
});
})
The dialog is launched but the "Cancel" doesn't work: the element is created anyway.
I've tried different way of returning the false method but same problem each time.
EDIT
$(document).ready(function(){
$( "#ctl00_m_g_9ff78e92_ed40_4212_ae0f_44b787664fa8_ctl00_toolBarTbl_RightRptControls_ctl00_ctl00_diidIOSaveItem" ).click(function() {
function PreSaveAction() {
if (confirm("Confirmez-vous ce choix de réforme ? : ")) {
return true;
}
else {
return false;
}
}
//OpenConfigurationDialog("Confirmez-vous ce choix de réforme ?");
PreSaveAction();
});
})
ctl00_m_g_9ff78e92_ed40_4212_ae0f_44b787664fa8_ctl00_toolBarTbl_RightRptControls_ctl00_ctl00_diidIOSaveItem
the save button? Or is it a custom button?