Javascript Confirm dialog difficulty
Ok, this one is baffling me.
We're writing a web app, and every time a user clicks any control on the page, we are disabling all the other controls via Javascript so as to keep people from double-clicking. However, on one page, one button must do an additional task: display a confirmation dialog and then disable all the controls on the form (although any order would work). For example:
onClick = "if(Confirm('CommitDeleteButton','','Are you sure you want to delete this record?','','')) { DisableForm(); return true; } else { return false; }"
The form gets disabled but never posts, which means that return true is never reached. Does this happen because the control is disabled? The code must stay in the onclick event and cannot employ any other scripts elsewhere. Any ideas?
|