================STEP 1 - COPY CODE BELOW INTO HEADER======================= <script language="JavaScript">
<!--
function confirm_entry()
{
input_box=confirm("Click OK or Cancel to Continue");
if (input_box==true)
{
// Action when OK is clicked. You can replace the alert box with another function
alert ("You clicked OK");
}
else
{
// Action when Cancel is clicked. You can replace the alert box with another
function
alert ("You clicked Cancel");
}
}
-->
</script>
================STEP 1 - COPY CODE ABOVE INTO HEADER=======================
Step 1 - Paste code inside head <HEAD></HEAD> of HTML page
Step 2 - Paste code inside body <BODY></BODY> of HTML page
Change form name and field value to suit your pre-existing form
DESCRIPTION
Using a confirmation box, you can confirm whether a user really wants to
perform a certain action, and let them proceed or cancel accordingly, for
example.