Hello:

I would like to get confirmation from user, if a particular checkbox on form is not checked, whether they want to submit the form without checking this box.

I have written the following, but need help with it --missing something.

<script type="text/javascript">
function taxable(){

if (document.processEstimate.tax.checked == 0) 
    {
if (confirm('You have not checked the taxes. Are you sure you want to continue?')) document.processEstimate.submit(); else return false; 
    } 
else 

document.processEstimate.submit();
};
</SCRIPT>

and then

<form name="processEstimate" .... .... onsubmit="return taxable();">

Not working so far. Is this correct or is there a better way?

Thank you!
Mossa

here is a working code:

function validateprocessEstimate()
{
var focus_me = null, msg = "";

if (document.processEstimate.taxbox.checked == 0) 
{
msg += " ";
focus_me = focus_me || processEstimate.taxbox[0];
//}
if (msg != "")
{
var prefix = "\nSales Taxes were not added!\n";
var suffix = "\nClick OK to add and re-submit.\n";
var suffix = suffix + "\ Or click CANCEL to continue without Taxes."
var ask = confirm(prefix + msg + suffix);

if (ask) 
{
    if (focus_me)   
    {
        focus_me.focus()
    }
    return false;
}

else 
{
document.forms.processEstimate.submit();
}
}
}
else 
{
document.forms.processEstimate.submit();
}
}

and then

handlers:

<a href="#" class="classname" onclick="return validateprocessEstimate() && document.forms['processEstimate'].submit(); return false;">Print & Save</a>  
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.