Here, I am calling confirm(param1, param2)
method to display an alert Do you want to continue?
In this case, if the user clicks OK
There is no check!
confirm(param1, param2);
checkcount();
and you want to change your function name to something other than confirm.
<script>
function call(param1, param2, param3)
{
if (condition)
{
/*some process */
}
else
{
if(myConfirm(param1, param2)) {
checkcount();
}
}
}
function myConfirm(param1, param2)
{
if(condition)
{
var retVal = confirm("Do you want to continue ?");
if (retVal == true)
{
alert("User wants to continue!");
return true;
}
else
{
alert("User does not want to continue!");
return false;
}
}
}
</script>