Possible Duplicate:
Javascript Confirm popup Yes, No button instead of OK and Cancel
Please someone help me to make a confirm box with button "Yes" and "No" without using jquery or VB.Script. I have searched a lot but I got all of the answers with jquery but that is not my requirement.
I have to call another function from confirmbox function. The code I am using below
HTML
<a href="#" onlick="show_confirm('<?php echo $cat_id; ?>')">Delete</a>
And Javascript
<script type="text/javascript">
function show_confirm(cat_id)
{
var conf = confirm("Are you sure you want to delete the file");
if (conf ==true)
{
deleteCatagory(cat_id);
}
}
function deleteCatagory(cat_id)
{
var obj = document.getElementById("file_"+cat_id);
callAjax(cat_id,obj);
}
</script>