Javascript confirmation box
Use this script to let a user confirm his actions
<script LANGUAGE="JavaScript">
<!--
// Javascript confirmation box
function confirmSubmit(){
var agree=confirm("Are you sure you wish to continue?");
if (agree)
return true ;
else
return false ;
}
// -->
</script>
|
|
Description
Include the code in the head section of the html page and add it to a link or form element. Example:
<form method="POST" action="" onsubmit="return confirmSubmit()" id="submitform" name="submitform">
-- OR --
<a onclick="return confirmSubmit()" href="some url">delete</a>
-- OR --
<input type="Submit" name="Delete" value="Delete" onClick="return confirmSubmit()">
Top