I want to have a confirmation from the user before they submit a form. This will prevent accidental POSTing of the form, that may be incomplete or incorrect.
Here is my
Instead of returning 0 and 1, return true and false. You can actually shorten the function to:
true
false
function confirm_update() { return confirm("Are you sure you want to submit?"); }