The following tutorial and code shows how to get the input from the user through a Javascript message box which contains the "OK" and "Cancel" buttons. Based on the user selection further processing can be handled.
<HTML>
<HEAD>
<SCRIPT language="JavaScript">
function Msgbox_OkCancel()
{
var retval;
retval = confirm('Are you sure?');
if(fRet==true)
{
alert("Insert your code here...");
}
}
</SCRIPT>
</HEAD>
<BODY>
<a href="javascript: Msgbox_OkCancel();">Click here</a>
</BODY>
</HTML>