I am having the following script
<script type="text/javascript"> $(document).ready(function () { $("#btn").click(function () { var inputs = document.getElementsByTagName("input"); var flag = 0; for (var i = 0; i < inputs.length; i++) { if (inputs[i].type == "checkbox") { if (inputs[i].checked) { flag = 1; break; } } } if (flag == 0) { jAlert('Select One', 'Alert Dialog'); } else { $("#btn").click(function () { var inputs = document.getElementsByTagName("input"); var flag = 0; for (var i = 0; i < inputs.length; i++) { if (inputs[i].type == "checkbox") { if (inputs[i].checked) { flag = 1; break; } } } if (flag == 0) { jAlert('Select One', 'Alert Dialog'); //return false; } else { jConfirm('Can you confirm this?', 'Confirmation Dialog'); } //return false; }); } return false; }); }); </script>
At the time i am going to display Confirm dialog and when the user selects Ok from that i have to return true if not false how can i do that.