Example:
<script type="text/javascript"><!--
function IsAccident() {
return (confirm("Is this an accident?");
}
// --></script>
<form ... onsubmit="return IsAccident()">
Explanation:
When an HTML form is submitted, the "onsubmit" event handler gives a "last
chance" to cancel the submit. It can call a JavaScript function that returns
true or false. If the function returns true, the form is submitted. If not,
the form is not submitted.
--
HTH,
Kevin Spencer
Microsoft MVP
..Net Developer
What You Seek Is What You Get.
"Q. John Chen" <qj****@email.com> wrote in message
news:11**********************@z14g2000cwz.googlegr oups.com...
I have a "Delete" button on WebForm, but I want to popup a warning
message with OK and Cancel in case user clicked the button by accident.
HOW?