Forum Moderators: open
The code, which someone here gave me (can`t remember who) is as follows:
<script language="JavaScript" type="text/JavaScript">
function submitConfirmation()
{
var confirmSub = confirm("Are you sure?");
if (confirmSub)
{
return true;}
else
{
return false;
}
}
</script>
Then I use the onsubmit = submitConfirmation(); in the form tag.
The code is displaying ok, in the sense that the box appears ok, saying "Are you sure?", but its not returning false if cancel is clicked. The entry gets deleted if ok or cancel are clicked.
Any ideas please?
Thank you.